1

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

drush user-add-role "power user" [email protected]

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?

1 Answer 1

5

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

drush user-add-role "power user" $(drush user-information [email protected] --field=name)

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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