function shib_auth_get_rolename in Shibboleth Authentication 7.4
Same name and namespace in other branches
- 6.4 shib_auth.module \shib_auth_get_rolename()
Retrieves role name from role id using the role cache.
Parameters
int $rid: The id of the role.
Return value
string|null The role name from the cache.
2 calls to shib_auth_get_rolename()
- shib_auth_process_rule in ./
shib_auth.module - This function processes role assignment rules.
- _shib_auth_list_rules in ./
shib_auth_roles_forms.inc - Lists all rules, and let the admin to do certain actions with them.
File
- ./
shib_auth.module, line 1489 - Drupal Shibboleth authentication module.
Code
function shib_auth_get_rolename($rid) {
if (isset($_SESSION['shib_auth_rolecache'][$rid])) {
return $_SESSION['shib_auth_rolecache'][$rid];
}
// For some reason we don't have the name for the role id.
shib_auth_error("Internal error: no name for role_id '{$rid}'");
return NULL;
}