function user_modules_installed in Drupal 7
Implements hook_modules_installed().
File
- modules/
user/ user.module, line 3993 - Enables the user registration and login system.
Code
function user_modules_installed($modules) {
// Assign all available permissions to the administrator role.
$rid = variable_get('user_admin_role', 0);
if ($rid) {
$permissions = array();
foreach ($modules as $module) {
if ($module_permissions = module_invoke($module, 'permission')) {
$permissions = array_merge($permissions, array_keys($module_permissions));
}
}
if (!empty($permissions)) {
user_role_grant_permissions($rid, $permissions);
}
}
}