WordPress Registration Form Plugin (CMREG) - Invitation Codes - Enabling Additional User Roles with Invitation Codes
Enabling Additional User Roles with Invitation Codes
Since the version 3.8.0, the WordPress Registration Form Plugin allows users to enable additional user roles by using invitation codes. It can be done via relevant form which you can display on the front-end using shortcode.
Shortcode
To display the form, use the shortcode [cmreg-additional-code]
- just place it on the needed page. The form is visible for logged-in user only. You can use the shortcode on it's own, or you can use it to wrap a message for guest users, to inform them that they need to login.
Example:
[cmreg-additional-code] You must be logged-in to access this form[/cmreg-additional-code]
Result on the front-end for logged-in users:
Result on the front-end for guest users:
Setting Up Additional User Role Using Code
Let's say, we have a user who registered using an invitation code. The invitation code gave him an initial user role Subscriber:
And here's what we see in his user profile - the main role is Subscriber, additional roles are not set, and we see an invitation code that the user used.
And we want to give the user more capabilities by setting an additional user role Author. We create an invitation code that changes the user role:
The user needs to enter the code to the provided form. After that he will see a success message:
In the list of users we can see that the user now has 2 roles, and in the column Invitation Code we see titles of all used by the user codes, and we also see the last used code:
The same in the user profile - we can see the main user role, additional user role, and info about used invitation codes:
Labels
It is also possible to configure the labels for the front-end form. To configure it, navigate to Admin Dashboard → CM Registration Pro → Settings → Labels tab:
Needed labels can be found under the section Additional Code Shortcode:
More information about the WordPress Registration Form 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 |