Multiple Roles

Description

This plugin allows you to select multiple roles for a user – something that WordPress already supports « under the hood », but doesn’t provide a user interface for.

User edit and Add new user screens will display a checklist of roles instead of the default role dropdown. The main user list screen will also display all roles a user has.

It also supports well Multisite mode.

That’s it. No extra settings.

If you want to contribute to this plugin, feel free to check the Github repository : https://github.com/Mahjouba91/multiple-roles

Captures d’écran

  • The roles checklist on Edit User screens
  • The Users screen with the enhanced Roles column

Installation

Automatic Install

  1. Log into your WordPress dashboard and go to Plugins → Add New
  2. Search for « Multiple Roles »
  3. Click « Install Now » under the Multiple Roles plugin
  4. Click « Activate Now »

Manual Install

  1. Download the plugin from the download button on this page
  2. Unzip the file, and upload the resulting multiple-roles folder to your /wp-content/plugins directory
  3. Log into your WordPress dashboard and go to Plugins
  4. Click « Activate » under the Multiple Roles plugin

FAQ

Who can edit users roles?

Anyone with the promote_users capability. By default, that means only administrators and network administrators on multi-site.

Can you edit your own roles?

If you’re a network administrator on a multi-site setup, yes, you can edit your roles in sites of that network. Otherwise, no. This is how WordPress works normally too.

I’m on the user edit screen – where’s the checklist of roles?

It’s underneath the default profile stuff, under the heading « Permissions ». If you still can’t find it, you might be on your own profile page, or you might not have the promote_users capability.

Can you remove all roles from a user?

Sure. The user will still be able to log in and out, but won’t be able to access any admin screens or see private pages. However, the user will still be able to see the WP Toolbar by default, which displays links to the Dashboard and Profile screens, so clicking on those will result in seeing a permission error.

Avis

4 mai 2018
Installed this on my 4.9.5 site and performance was severely degraded. This was the first thing I disabled in order to troubleshoot and it was like night and day. Recommend finding an alternate solution unless this issue is addressed.
3 octobre 2017
In my opinion, it's a major oversight for WP to not provide this interface by default. What a ridiculous limitation to have only one role per user. As you say, the underlying feature exists, but WP does not make it accessible. This plug-in does a great job of fixing that oversight. Thanks.
Lire les 13 avis

Contributeurs & développeurs

« Multiple Roles » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“Multiple Roles” a été traduit dans 3 locales. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « Multiple Roles » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal

1.3.1

  • 1st july 2020
  • Test the plugin against WordPress 5.4
  • Fix an issue when the user role could be lost because of a wrong check in the backend

1.3.0

  • 12 april 2018
  • Use ‘promote_users’ cap instead of ‘edit_users’
  • Fixed bug preventing us from unsetting a user’s roles
  • Only remove get_editable_roles() roles on update
  • Thanks to thomasfw for the contributions

1.2.0

  • 21 august 2017
  • Check compatibilty with WP 4.8.1
  • Translation of roles names : thanks to Benjamin Niess
  • Mutlisite enhancement : Use a WP 4.8 filter to easier edit signup user meta

1.1.4

  • 23 december 2016
  • Fix fatal error in new user in single site : After adding an user, a wp_die error was shown « You can’t give users that role », it was due to changes in 1.1.2
  • Workaround to handle multisite support without breaking single site features

1.1.3

  • 22 december 2016
  • Fix fatal error in user update : After updating an user, a wp_die error was shown « You can’t give users that role », it was due to changes in 1.1.2

1.1.2

  • 21 december 2016
  • Fix bug in multisite : After adding a new user with email confirmation, the multiple roles were not set, so the user did not have any roles on the site

1.1.1

  • 3 november 2016
  • Remove PHP closure to ensure Backward Compatibility with PHP versions < 5.3

1.1

  • 24 october 2016
  • Nouveau mainteneur : Florian TIAR, vous êtes vivement encouragé à mettre à jour l’extension
  • Ajout du support des rôles multiples lors de la création d’un nouvel utilisateur (backoffice)
  • L’extension est 100% compatible Multisite
  • L’extension est désormais 100% traduisible
  • Ajout de certains hooks (crochets)
  • Corrige le bug où certains utilisateurs pouvaient ajouter des utilisateurs dépassant leurs propres capacités (exemple : un éditeur ajoute un administrateur)
  • Amélioration de la sécurité (escape/sanitization des données)
  • Amélioration de l’expérience utilisateur du formulaire

1.0

  • 2015
  • Version initiale