You are here

function hook_ldap_attributes_needed_alter in Lightweight Directory Access Protocol (LDAP) 8.3

Same name and namespace in other branches
  1. 8.2 ldap_servers/ldap_servers.api.php \hook_ldap_attributes_needed_alter()
  2. 7.2 ldap_servers/ldap_servers.api.php \hook_ldap_attributes_needed_alter()

Perform alterations of LDAP attributes before query is made.

To avoid excessive attributes in an LDAP query, modules should alter attributes needed based on $op parameter.

Parameters

array $attributes: Array of attributes to be returned from LDAP queries where:

  • each key is LDAP attribute name (e.g. mail, cn)
  • each value is associative array of form:
    • 'conversion' => NULL,
    • 'values' => array(0 => 'john', 1 => 'johnny'))

array $params: Context array with some or all of the following key/values 'sid' => Drupal account object, 'ldap_context' => , 'direction' =>.

2 functions implement hook_ldap_attributes_needed_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ldap_servers_ldap_attributes_needed_alter in ldap_servers/ldap_servers.module
Implements hook_ldap_attributes_needed_alter().
ldap_user_ldap_attributes_needed_alter in ldap_user/ldap_user.module
Implements hook_ldap_attributes_needed_alter().

File

ldap_servers/ldap_servers.api.php, line 114
Hooks provided by ldap_servers module.

Code

function hook_ldap_attributes_needed_alter(array &$attributes, array $params) {
}