If either the editor or administrator role is missing an error will be thrown since those roles are hard-coded. A patch is coming soon that will bypass setting permissions if the roles don't exist.

#1 1942588-d7-1.patch7.06 KBredndahead
Members fund testing for the Drupal project. Drupal Association Learn more


redndahead’s picture

Status: Active » Needs review
7.06 KB

Here is the patch. It also cleans up some whitespace. I also noticed that the multiple calls to user_role_grant_permissions was unnecessary. It can just take an array of permissions. I think this can be done in another issue.

populist’s picture

Status: Needs review » Fixed

Looks great. Reviewed and committed to -dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.