CM Restrict User Account Access - Use Case - Integration With CM Registration and Invitation Codes


Use Case - Integration with CM Registration Invitation Codes

Back to User Guides

Note: This guide requires:

Video Use-Case


Introduction

CM Restrict User Account allows you to automatically block or delete user accounts on your site after some period of time, or restrict user accounts by the amount of logins.

CM Registration allows your users to login and register to your site via beautiful pop-ups. The CM Registration Bulk Invitation Addon lets you create multiple invitation codes for registration users on your site.

Use Case Front-End

The user registers using the invitation code:

The user tries to login, but his account is not activated yet due to the restriction dates defined for the invitation code:

Date restrictions applied to the user that registered using the invitation code.

Use Case Assumptions

In this example use case guide we will consider how to integrate CM Restrict User Account Access with CM Registration. You will get to know how to create single and multiple invitation codes with the activation and expiration dates of user accounts.

We assume that you have already bought the plugins and add-on, but not installed them yet.

It follows:


Installing the Plugin

The process is the same for all CM plugins and add-ons.

  • Download the plugin from your customer dashboard
  • Log in to WordPress and navigate to the WordPress Admin → Plugins settings
  • Click on Add New
  • Activate it and add the license

Learn more: Installation


Quick Recap

In this use case guide we will consider in details the integration between the plugins. You can learn more about configuring plugins CM Restrict User Account Access, CM Registration and CM Registration Bulk Invitation Addon:

What Is Invitation Codes

The CM Registration plugin allows creating invitation codes that can be sent to certain users and required for registration.

Using invitation codes you can achieve the following:

  • Limit and control the amount of registrants.
  • Manage registration campaigns to your pre-launched site.
  • Define specific roles to be assigned to users when using a specific invitation code.
  • Define a membership level once using a specific invitation code.
  • Require or not require email verification for specific invitation codes.
  • Integration with CM Restrict User Account Access allows defining the activation and expiration dates of user accounts. 

Creating Single Invitation Codes

To create a single invitation code, navigate to Admin Dashboard → CM Registration Pro → Invitation Codes.

Then click Add Invitation code at the top of the page.

Here you can edit:

  • Title - add the name of the code. This is for internal usage and the users won't have access to it.
  • Code - You can either type a code yourself (for instance "Welcome"). The plugin is flexible and accepts virtually any value - you can use as many characters as you would like.
    Alternatively, click the  Generate new button to instantly generate a randomized 12-characters code.
  • Expiration date - add a code expiration date. After this date, the invitation code can not be used
  • Users limit - The number of times this invitation code can be used.
  • Require email verification - choose whether to require email verification or not or follow global plugin settings.
  • Require to use the following email - This feature lets you restrict the usage of a specific invitation code to a specific user. So users can not send the invitation code to someone else. If an email address is set, the plugin will send an email with the invitation code to the user as soon as it is created.
  • User role - Admin can choose which WP role will be set for a user that registered with the specific invitation code.
  • Custom Redirection URL after login for users that used this code - Put here a URL, where the user will be redirected after he logins to the site.

Next a few options are the core of the plugins integration:

  • Choose date type to activate user access after - This option defines the activation date of a user account. Here you can choose between:
    • None - Disable the activation date. It means, the user account will be activated after registration.
    • Absolute - The account will be activated on the date and time that you define in the field below. Let's choose this option for our example.
    • Relative - The account will be activated after certain amount of time after registration date. In the field below you need to define the amount and type of time (minutes, hours, days, weeks, months, years), eg - 5 hours.
  • Choose date type to restrict user access after - This option defines the expiration date of a user account. Here you can choose between:
    • None - Disable the expiration date. It means, the user account will not be restricted after some period of time.
    • Absolute - The account will be restricted on the date and time that you define in the field below. Let's choose this option for our example.
    • Relative - The account will be restricted after certain amount of time after registration date. In the field below you need to define the amount and type of time (minutes, hours, days, weeks, months, years), eg - 1 month.
      • Delete user after expiration - This option appears when you choose Absolute or Relative type of expiration. Enable it to delete a user account after expiration. If enabled, you can choose what to do with the content of deleted user: 
        • Delete all content 
        • Attribute all content to the specific user
        • Use default global setting (you can define it in plugin settings, learn more)

When you finished configuring the invitation code, click the button Publish.

Now let's register a new user and see the result.

TIP: Require Invitation Code

Don't forget to enable requiring the invitation code while registration. To enable it, navigate to Admin Dashboard → CM Registration Pro → Registration tab.

Find the option Ask for invitation code and choose require, then click the Save button at the bottom of the page.

User Registration

The user registers:

The user tries to login, but his account is not activated yet due to the date we defined:

Let's see the information in his user profile. Navigate to Admin Dashboard → Users → All Users.

Here you can see the date restrictions in the Restrict Date column:

Now hover on the needed user and click Edit.

Scroll down to the section CM Restrict User Account Access. Here you can see that all settings we defined while creating the invitation code, were applied to the user who registered using this code.

Creating Invitation Codes In Bulk

Note: the options that are described in this chapter are only available when the CM Registration Bulk Invitation Addon is activated.

Learn more detailed about creating invitation codes in bulk in this guide: CM Registration (CMREG) + Bulk Email Invitation Add-on - Use Case - Creating Invitation Codes Based On Mail Lists

There are a few ways of creating invitation codes in bulk, but all these methods are very similar to the creating single invitation code. So we will consider only the settings that are different.

Navigate to Admin Dashboard → CM Registration Pro → Bulk Invitations.

There you can see the table with all bulk invitations, and two buttons above the table - Create invitation codes and Invite users by email. Let's consider both of these methods.

Create invitation codes

Click on the button Create invitation codes.

The most part of settings are the same as for the creating single code. A few new options are:

  • Upload CSV file with invitation codes - You can upload the CSV-file with your own invitation codes prepared in advance.

If you don't want to upload the codes from CSV-file, you can create a sequence of randomly generated invitation codes with the following options:

  • Number of invitations codes to create - Define here the amount of invitation codes you want to create.
  • Use serial invitations with prefix - Check this box, if you want these codes to have a prefix.
  • Invitations prefix - Write the prefix that the invitation codes will have (in case, if you enabled previous option).

The rest of the options are the same as for creating single invitation code. When you finished configuring the codes, click the button Create invitation codes. After clicking on it, you will see the list of created codes, which you can view or download using the buttons Show codes and Download CSV.

You can also manage these codes in the list of created sequences of codes.

Invite users by email

Another way for creating invitation codes in bulk is to create them by using the CSV-file with the list of emails. There will be generated a random code for each email address in the list. Click the button Invite users by email

The options that are different from creating single invitation code are:

  • Upload CSV file with emails - Upload here the CSV-file with the list of emails. Each email address must be on a separate line in the CSV-file.
  • Do not send emails, just create invitation codes for those emails without sending notifications - Check this box, if you don't want to send email with the invitation code to the relevant email address. If it's not checked, below there will be available a form for editing email template.
  • Require to use the same email during the registration - If checked, the generated code can be used for registration only by using the relevant email address. Otherwise, this code can be used with any other email address.

Email Template:

Edit the subject and body of the email template. The body of email accepts the following shortcodes:

  • [blogname] 
  • [siteurl] 
  • [invitation-code] - this shortcode must be in the email.

The rest of the options are the same as for creating single invitation code. When you finished configuring the codes, click the button  Create bulk invitation. After clicking on it, you will see the list of created codes.

In both cases of creating bulk invitation codes, the registered users will be restricted according to defined settings the same as in the method with single invitation code.

End Result

Following instructions found in the plugin and guides, you should be able to create single and multiple invitation codes with the dates of activation and expiration of user accounts.

Use Case Front-End

The user registers using the invitation code:

The user tries to login, but his account is not activated yet due to the restriction dates defined for the invitation code:

Date restrictions applied to the user that registered using the invitation code.


More information about the CM Restrict User Account Access 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.