public function LdapAuthorizationConsumerDrupalRole::refreshConsumerIDs in Lightweight Directory Access Protocol (LDAP) 7
2 calls to LdapAuthorizationConsumerDrupalRole::refreshConsumerIDs()
- LdapAuthorizationConsumerDrupalRole::availableConsumerIDs in ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php - get list of all authorization consumer ids available to a this authorization consumer. For example for drupal_roles, this would be an array of drupal roles such as array('admin', 'author', 'reviewer',... ). For organic…
- LdapAuthorizationConsumerDrupalRole::__construct in ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php - Constructor Method
File
- ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php, line 40
Class
Code
public function refreshConsumerIDs() {
$this->drupalRolesByName = array();
foreach (array_flip(user_roles()) as $role_name => $rid) {
$this->drupalRolesByName[drupal_strtolower($role_name)] = $rid;
}
$this->_availableConsumerIDs = array();
// array_values(user_roles(TRUE));
foreach (array_values(user_roles(TRUE)) as $role_name) {
$this->_availableConsumerIDs[] = $role_name;
}
}