function _user_configuration_get_roles in Configuration Management 7
Generate $rid => $role with role names untranslated.
3 calls to _user_configuration_get_roles()
- user_permission_configuration_rebuild in includes/
configuration.user.inc - Implements hook_configuration_rebuild(). Iterate through default permissions and update the permissions map.
- user_role_configuration_export_options in includes/
configuration.user.inc - Implements hook_configuration_export_options().
- _user_configuration_get_permissions in includes/
configuration.user.inc - Represent the current state of permissions as a perm to role name array map.
File
- includes/
configuration.user.inc, line 231
Code
function _user_configuration_get_roles($builtin = TRUE) {
$roles = array();
foreach (user_roles() as $rid => $name) {
switch ($rid) {
case DRUPAL_ANONYMOUS_RID:
if ($builtin) {
$roles[$rid] = 'anonymous user';
}
break;
case DRUPAL_AUTHENTICATED_RID:
if ($builtin) {
$roles[$rid] = 'authenticated user';
}
break;
default:
$roles[$rid] = $name;
break;
}
}
return $roles;
}