You are here

function ldap_user_synch_to_drupal in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_user/ldap_user.module \ldap_user_synch_to_drupal()

Api function for synching note: does no checking if synching is enabled or configured for a given context.

File

ldap_user/ldap_user.module, line 740
Module for the LDAP User Entity.

Code

function ldap_user_synch_to_drupal($username, $prov_event = LDAP_USER_EVENT_SYNCH_TO_DRUPAL_USER, $ldap_user = NULL) {
  $ldap_user_conf = ldap_user_conf();
  $account = user_load_by_name($username);
  $user_edit = [];
  $ldap_user_conf
    ->synchToDrupalAccount($account, $user_edit, $prov_event, $ldap_user, TRUE);
}