You are here

function LdapTestFunctions::drupalLdapUpdateUser in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::drupalLdapUpdateUser()
  2. 7 ldap_servers/tests/LdapTestFunctions.class.php \LdapTestFunctions::drupalLdapUpdateUser()

File

ldap_test/LdapTestFunctions.class.php, line 116

Class

LdapTestFunctions

Code

function drupalLdapUpdateUser($edit = array(), $ldap_authenticated = FALSE, $user) {
  if (count($edit)) {
    $user = user_save($user, $edit);
  }
  if ($ldap_authenticated) {
    user_set_authmaps($user, array(
      'authname_ldap_user' => $user->name,
    ));
  }
  return $user;
}