1

In Drush 8, you can add a role to an email address like this:

drush user-add-role "power user" --mail=penguin@example.com

In Drush 9, the --mail option no longer exists for user:role:add.

So, if I only have an email address, how can I add a role to the user account?

5

Maybe there are better ways, but the following should work:

drush user-add-role "power user" $(drush user-information --mail=penguin@example.com --field=name)

You get the user name from the e-mail address using the user-information command.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.