You are here

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

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

File

ldap_servers/tests/LdapTestFunctions.class.php, line 88
LdapTestCase.class.php

Class

LdapTestFunctions
@file LdapTestCase.class.php

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_authentication' => $user->name,
    ));
  }
  return $user;
}