function user_modules_installed
7.x user.module | user_modules_installed($modules) |
Implements hook_modules_installed().
File
- drupal-7.x/
modules/ user/ user.module, line 3914 - 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);
}
}
}