Published on
Dec 26, 2024
Updated on
08 Jan 2025
Share

Multiple User Roles Module: Advanced User Role Management

In WordPress, each user can be assigned just one role at a time, limiting the flexibility of permissions management. However, in specific cases, such as with e-commerce or LMS (Learning Management System) plugins, the ability to assign multiple roles to a user becomes essential. That's why we've developed the Multiple User Roles in WPMasterToolKit.

This module aims to simplify the assignment and management of multiple user roles directly from the WordPress administration interface, without having to install a third-party plugin or write code.

Which plugins can the Multiple User Roles module replace?

The module Multiple User Roles can replace several popular WordPress plugins dedicated to advanced user role management, such as :

  • User Role Editor used to modify roles and their permissions.
  • Members WPMasterToolKit: which offers similar functionality but with a more complex interface. With WPMasterToolKit, you benefit from an integrated, lightweight, high-performance solution.
Discover the module : Restoring plugins and themes

The module's main functions

  1. Adding multiple roles to a user
    With this module, you can assign multiple roles to a user when creating an account or modifying a profile. For example, a user can be both "Author" and "Customer" without conflict.
  2. Intuitive interface
    The module adds a checkbox in the "User profile" section to select the roles to be assigned. This makes the process simple and accessible even for non-technical administrators.
  3. Advanced permissions management
    This system supports custom roles defined by other plugins such as WooCommerce ("Customer" or "Shop Manager" roles) or LMS platforms ("Instructor", "Student" roles, etc.).
  4. Compatible with editable roles
    The module ensures that only roles that can be modified by the current administrator are available, by using the native function get_editable_roles() from WordPress.

How do I use the "Multiple User Roles" module?

  1. Module activation
    Once the module has been activated via the WPMasterToolKit interface, you can start using it straight away.
  2. Assigning roles to an existing user
    • Go to the edit user profile page in WordPress.
    • A new "Roles" section appears, displaying a list of available roles.
    • Select or deselect the roles you wish to assign to the user.
    • Save changes.
  3. Assigning roles to a new user
    • When creating a new user, the same interface will be available for assigning multiple roles, even before saving the user.
  4. Deleting and updating roles
    • Deselected roles will be automatically removed from the user, and newly selected roles will be added.
WordPress interface with selected user roles.

The technical choices behind the module

  1. Using native WordPress actions
    The module uses several native WordPress hooks to integrate its functionality, including :
    • show_user_profile and edit_user_profile to display the roles section of the user interface.
    • personal_options_update and edit_user_profile_update to save changes.
  2. Secure validation with nonces
    To protect data against CSRF attacks, the module uses a nonce WordPress in each form.
  3. Conditional registration of scripts and styles
    Module-specific scripts and styles are only loaded on the relevant administration pages (for example, user-edit.php and user-new.php), optimizing performance.
  4. Role management with native functions
    Roles are assigned and deleted using native WordPress functions add_role and remove_rolefor maximum compatibility with third-party plug-ins.
  5. User data filtering
    Prior to any modification, the module cleans and validates incoming data using functions such as wpmastertoolkit_clean to guarantee the integrity of assigned roles.
Pro
from
2.50$
/Month
14
Days
Money-back guarantee
risk-free at 100 %!

Conclusion

The module Multiple User Roles is an elegant, high-performance solution for WordPress administrators looking for advanced user role management. Replacing often complex or cumbersome third-party plugins, this module integrated into WPMasterToolKit is part of a minimalist, high-performance approach focused on real user needs.

Whether you manage an online store, an educational site or a community, this module simplifies your daily tasks when it comes to managing roles and permissions. Take advantage of this feature today by simply activating the module in your WPMasterToolKit dashboard!

Category
Other Features
Version
≤ 1.10.0
Type
Free
More than 18 reviews
+1000
Installations
104
Modules
Pro
from
30.00$
/Year