You are here

function ldap_authorization_drupal_role_ldap_authorization_consumer in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.module \ldap_authorization_drupal_role_ldap_authorization_consumer()
  2. 7.2 ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.module \ldap_authorization_drupal_role_ldap_authorization_consumer()

Implements hook_ldap_authorization_consumer().

1 call to ldap_authorization_drupal_role_ldap_authorization_consumer()
LdapAuthorizationConsumerDrupalRole::__construct in ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
Constructor Method

File

ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.module, line 16
maps ldap data to drupal roles

Code

function ldap_authorization_drupal_role_ldap_authorization_consumer() {
  $types['drupal_role'] = array(
    'consumer_name' => t('drupal role'),
    'consumer_name_plural' => t('drupal roles'),
    'consumer_short_name' => t('role'),
    'consumer_short_name_plural' => t('roles'),
    'consumer_description' => t('A Drupal Role.'),
    'consumer_class_name' => 'LdapAuthorizationConsumerDrupalRole',
    'consumer_class_file' => 'LdapAuthorizationConsumerRole.class.php',
    'consumer_module' => 'ldap_authorization_drupal_role',
    'consumer_mapping_directions' => '<p>Mappings should be of form:<br/>
<code>[raw authorization id]|[group name]</code>
<br/>such as:<br/>
<code>Campus Accounts|authenticated user<br/>
ou=Underlings,dc=myorg,dc=mytld|underlings<br/>
ou=IT,dc=myorg,dc=mytld,dc=edu|administrator
</code><br/>',
  );
  return $types;
}