function hook_ldap_entry_pre_provision_alter in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.4 ldap_servers/ldap_servers.api.php \hook_ldap_entry_pre_provision_alter()
- 8.2 ldap_servers/ldap_servers.api.php \hook_ldap_entry_pre_provision_alter()
- 8.3 ldap_servers/ldap_servers.api.php \hook_ldap_entry_pre_provision_alter()
Allows other modules to alter ldap entry or perform other necessary LDAP operations before entires are provisioned. This should be invoked before provisioning ldap entries.
Parameters
array $ldap_entries: as array keyed on lowercase dn of entry with value of array in format used in ldap_add or ldap_modify function e.g. $ldap_entries['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'] = array( "attribute1" => array("value"), "attribute2" => array("value1", "value2"), );.
LdapServer $ldap_server: as ldap server configuration object that is performing provisioning.
array $context: with the following key/values: 'action' => add|modify|delete
'corresponding_drupal_data' => if ldap entries have corresponding drupal objects, such as ldap user entries and drupal user objects; ldap groups and drupal roles; etc this will be array keyed on lowercase dn with values of objects, e.g. : [ 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu' => drupal user object1, 'cn=jfun,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu => drupal user object2, ] 'corresponding_drupal_data_type' => 'user', 'role', etc.
3 invocations of hook_ldap_entry_pre_provision_alter()
- LdapServer::groupAddGroup in ldap_servers/
LdapServer.class.php - NOT TESTED add a group entry.
- LdapUserConf::provisionLdapEntry in ldap_user/
LdapUserConf.class.php - Given a drupal account, provision an ldap entry if none exists. if one exists do nothing.
- LdapUserConf::synchToLdapEntry in ldap_user/
LdapUserConf.class.php - Given a drupal account, synch to related ldap entry.
File
- ldap_servers/
ldap_servers.api.php, line 68 - Hooks provided by ldap_servers module.
Code
function hook_ldap_entry_pre_provision_alter(&$ldap_entries, $ldap_server, $context) {
}