CM Restrict User Account Access - Advanced - Filter Overview


Filters - Modifying Account Account Activation and Restriction Dates

Back to User Guides

Advanced Guide

This guide is intended to be read by developers, as it talks about WordPress APIs. Learn more.


Modify account activation and restriction dates on user login

Does not update user meta fields.

  • Filter - cmrua_user_login_restriction_dates
  • Attributes
    • $dates– (array) Dates in Unix Timestamp format
  • Usage - add_action( 'cmrua_user_login_restriction_dates', 'function_name', 10, 4 );


Example

<?php

add_filter( 'cmrua_user_login_restriction_dates', function( $dates) {

$dates['activationDate'] = '1590624000';

$dates['restrictedDate'] = '1585699200';

return $dates;

} );

?>


Modify account activation and restriction dates on user registration

Updates the user meta fields.

  • Filter - cmrua_user_registered_restriction_dates
  • Attributes
    • $dates– (array) Dates in Unix Timestamp format
  • Usage - add_action( 'cmrua_user_login_restriction_dates', 'function_name', 10, 4 );

Example

<?php

add_filter( 'cmrua_user_registered_restriction_dates', function( $dates) {

$dates['activationDate'] = '1590624000';

$dates['restrictedDate'] = '1587340800';

return $dates;

} );?>


More information about the CM MicroPayments WordPress  Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.