You are here

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

Same name and namespace in other branches
  1. 7.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 221

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'];
}