function user_modules_installed

Implements hook_modules_installed().

File

modules/user/user.module, line 4054

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);
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.