You are here

function hook_ldap_entry_alter in Lightweight Directory Access Protocol (LDAP) 7.2

Allow a custom module to alter $ldap_user.

Parameters

array $ldap_user: See README.developers.txt for structure.

array $params: Array of parameters. Includes account key with the Drupal account as value.

3 invocations of hook_ldap_entry_alter()
LdapUserConf::drupalUserToLdapEntry in ldap_user/LdapUserConf.class.php
Populate ldap entry array for provisioning.
LdapUserConf::provisionDrupalAccount in ldap_user/LdapUserConf.class.php
Given a drupal account, query ldap and get all user fields and save user account (note: parameters are in odd order to match synchDrupalAccount handle)
_ldap_authentication_user_login_authenticate_validate in ldap_authentication/ldap_authentication.inc
User form validation will take care of username, pwd fields this function validates ldap authentication specific.

File

ldap_authentication/ldap_authentication.api.php, line 43
Summary of hooks and other developer related functions.

Code

function hook_ldap_entry_alter(array &$ldap_user, array $params) {
  $ldap_user['mail'] = 'newmail@example.com';
}