function LdapTestFunctions::drupalLdapUpdateUser in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::drupalLdapUpdateUser()
- 7 ldap_servers/tests/LdapTestFunctions.class.php \LdapTestFunctions::drupalLdapUpdateUser()
File
- ldap_test/
LdapTestFunctions.class.php, line 116
Class
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;
}