Skip to content
Snippets Groups Projects
Commit b9481a07 authored by Tim Steiner's avatar Tim Steiner
Browse files

Update UNL profile to give the administrator role all permissions even if that...

Update UNL profile to give the administrator role all permissions even if that role's ID has changed.

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@221 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 16405a80
No related branches found
No related tags found
No related merge requests found
......@@ -239,6 +239,13 @@ EOF;
// Only enable CAS on subsites until we get some sort of bootstrap setup.
module_enable(array('unl_cas'));
// If the administrator role has changed from the default ID, be sure to grant the new ID all permissions.
$results = db_query("SELECT rid FROM ${shared_prefix}role WHERE name LIKE 'administrator'")->fetchCol();
if (isset($results[0]) && $results[0] != 3) {
user_role_grant_permissions($results[0], array_keys(module_invoke_all('permission')));
variable_set('user_admin_role', $results[0]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment