You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for adding and removing of multiple user roles
The two commands user add-role and user remove-role are now less lazy and can accept > multiple roles to add or remove for a given user. You can make this work by simply adding > as many roles as needed as separate arguments.
$ wp user add-role 12 author editor
Success: Added 'author', 'editor' roles for johndoe (12).
$ wp user remove-role 12 author editor
Success: Removed 'author', 'editor' roles for johndoe (12).
The text was updated successfully, but these errors were encountered:
This was added in wp-cli 2.10.0. Since we recently added support for multiple roles in the GUI this makes a nice addition to that.
https://make.wordpress.org/cli/2024/02/08/wp-cli-v2-10-0-release-notes/
The text was updated successfully, but these errors were encountered: