CM Restrict User Account Access - How To - Downgrade a User Role
How To - Downgrade a User Role
Since the version 1.3.3 of CM Restrict User Account Access, it is possible to downgrade the user role instead of blocking it when it expires.
Enabling the Feature for All Users
To enable it, navigate to Admin Dashboard → CM Restrict User Account Access Pro → Settings → General tab.
Scroll down and find the section Downgrade. The options are:
- Enable downgrade process after expire - Enable it if you want to downgrade the user role when the account expired instead of blocking it.
- Pick the user role - This is global setting for all users. When the account expires, the user will be assigned the selected user role. You can choose here any user role except Administrator user role.
Click the button Save at the bottom of the page.
Now if any user has a restriction date specified for his account, will be downgraded after the expiration date.
TIP
Learn more about how to specify restriction date and time for users:
Overriding Downgrade User Role for Specific Users
It is also possible to specify different downgrade user role for chosen users.
To do this, navigate to Admin Dashboard → Users → All Users. Hover on the needed user and click Edit.
Scroll down and find the section CM Restrict User Account Access. When the option Enable downgrade process after expire is enabled in the general plugin settings, you will a few new options:
Downgrade Role - You can choose there any user role created on your site, except Administrator.
Downgrade role by certain period - This option allows you to specify certain user roles to a user for specific periods of time. After the expiration, the user role from the option Downgrade Role will be used. Note: this option was introduced in version 1.3.8.
To save the changes, click the button Update User at the bottom of the page.
Tracking User Restriction Date and Downgrade Role
To monitor, which users have restriction dates, current user role and downgrade roles, get back to Admin Dashboard → Users → All Users.
There you can see the following columns with relevant information for each user:
- Role - Shows current user role.
- Restrict Date - Shows the restriction date if specified.
- Downgrade Role - Shows the downgrade role - either global setting or specific user role.
Note 1 - Deleting Users
Have a note that those user accounts which are supposed to be deleted - they will be deleted after the expiration date. The downgrade user role feature will not work for them.
Note 2 - Cron Events
When you specify the restriction date for the user, you can also specify the certain time.
Have a note that downgrading the user role will not happen immediately. Checking the user status and downgrading is controlled by the cron event, which is scheduled to process every 60 minutes by default.
It means that if the nearest cron event is scheduled at 9:00 am, and the restriction date for the user is specified to 8:37 am, then the user account will be blocked until 9:00 am. After that the user role will be downgraded and the user will be able to continue using his account.
It is possible to change the cron event schedule to be process oftener. You can use some third-party plugin, for example - WP Crontrol.
When the plugin is installed and activated, navigate to Admin Dashboard → Tools → Cron Events.
Under the Cron Events tab, hover on the check_users_restrict item and click Edit.
In the option Recurrence, you can choose how often you want to launch this Cron Event. Have a note that having many cron events which are a repeated too often may affect the site performance.
Additionally, under the Cron Schedules tab, you can create you own intervals.
More information about the CM Restrict User Account Access 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 |