0

I am trying to use drush to assign the user role "content author" to a user on a drupal7 site, however I get this error.

drush @mysite.com urol 'content author' --uid=15
Could not find a uid for the search term 'author'!                   [error]
There is no role named: content                                      [error]

I have tried assigning 'administrator' role to this user with the same drush command and it works fine, however, any other roles that its name contains two words don't work. Looking at the list of roles and I can see;

+-----+--------------------+--------+
| rid | name               | weight |
+-----+--------------------+--------+
|   3 | administrator      |      2 |
|   1 | anonymous user     |      0 |
|   2 | authenticated user |      1 |
|   4 | content author     |      3 |
|   5 | forum moderator    |      4 |
+-----+--------------------+--------+

I understand that the machine name should be used when using the drush command to assign roles, but referring to the records of role table there isn't any other name given to the roles. I have also tried 'content_author', 'content-author' but no luck. Can someone please help me get this right. Thanks!

Saber
  • 107
  • 1
  • 10

0 Answers0