public function LdapTestFunctions::drupalLdapUpdateUser in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::drupalLdapUpdateUser()
- 7 ldap_servers/tests/LdapTestFunctions.class.php \LdapTestFunctions::drupalLdapUpdateUser()
File
- ldap_test/
LdapTestFunctions.class.php, line 148
Class
Code
public function drupalLdapUpdateUser($edit = [], $ldap_authenticated = FALSE, $user) {
if (count($edit)) {
$user = user_save($user, $edit);
}
if ($ldap_authenticated) {
user_set_authmaps($user, [
'authname_ldap_user' => $user->name,
]);
}
return $user;
}