You are here

private function LdapAuthorizationConsumerDrupalRole::getDrupalRoleIdFromRoleName in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php \LdapAuthorizationConsumerDrupalRole::getDrupalRoleIdFromRoleName()

Parameters

string mixed case $role_name:

Return value

integer role id

2 calls to LdapAuthorizationConsumerDrupalRole::getDrupalRoleIdFromRoleName()
LdapAuthorizationConsumerDrupalRole::grantSingleAuthorization in ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
Extends grantSingleAuthorization()
LdapAuthorizationConsumerDrupalRole::revokeSingleAuthorization in ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php

File

ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php, line 239

Class

LdapAuthorizationConsumerDrupalRole

Code

private function getDrupalRoleIdFromRoleName($role_name) {
  $role_ids_by_name = $this
    ->existingRolesByRoleName();
  $role_name_lowercase = drupal_strtolower($role_name);
  return empty($role_ids_by_name[$role_name_lowercase]) ? NULL : $role_ids_by_name[$role_name_lowercase]['rid'];
}