function hook_sync_user_to_ldap in Simple LDAP 7.2
Same name and namespace in other branches
- 7 simple_ldap_user/simple_ldap_user.api.php \hook_sync_user_to_ldap()
Synchronizes a Drupal user to LDAP.
This hook is called when simple_ldap_user needs to synchronize Drupal user data to LDAP.
This example sets the LDAP employeeType attribute to "full-time"
Parameters
StdClass $user: The full Drupal user object that is being synchronized.
2 functions implement hook_sync_user_to_ldap()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- simple_ldap_role_sync_user_to_ldap in simple_ldap_role/
simple_ldap_role.module - Implements hook_sync_user_to_ldap().
- simple_ldap_user_sync_user_to_ldap in simple_ldap_user/
simple_ldap_user.module - Synchronizes Drupal user properties to LDAP.
2 invocations of hook_sync_user_to_ldap()
- simple_ldap_user_user_insert in simple_ldap_user/
simple_ldap_user.module - Implements hook_user_insert().
- simple_ldap_user_user_update in simple_ldap_user/
simple_ldap_user.module - Implements hook_user_update().
File
- simple_ldap_user/
simple_ldap_user.api.php, line 58 - Describe hooks provided by the Simple LDAP User module.
Code
function hook_sync_user_to_ldap($user) {
$ldap_user = SimpleLdapUser::singleton($user->name);
$ldap_user->employeeType = 'full-time';
$ldap_user
->save();
}