Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I had role name something like "User [with editation]" and tried to add some other role permission to edit or delete this role (edit users with role User [with editation]) system returned an error after submitting the form. After I changed the role name to standard brackets () it started working.
Probably something with function
function administerusersbyrole_perm() {
$roles = db_query('SELECT name FROM {role} WHERE rid > 2 ORDER BY name');
$perms = array();
$perms[] = 'create users';
while ($role=db_fetch_array($roles)) {
$perms[] = 'edit users with role '. $role['name'];
$perms[] = 'delete users with role '. $role['name'];
}
return $perms;
}
Character escaping would probably solve this. Didnt tested that though.
Comments
Comment #1
smokrisI don't think there exists a way to escape characters for use in permissions strings.
I've added a workaround, which removes any non-alphanumeric characters from the permissions strings generated by Administer Users by Role.
Committed to 6.x-1.x-dev as http://drupalcode.org/project/administerusersbyrole.git/commit/44cd055.