function ldap_user_modify in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_servers/ldap_servers.functions.inc \ldap_user_modify()
- 7 ldap_servers/ldap_servers.functions.inc \ldap_user_modify()
Modify an LDAP Entry.
Deprecated
This has been deprecated in favor of `$ldap_server->modifyLdapEntry($dn, $attributes)` which handles empty attributes better.
File
- ldap_servers/
ldap_servers.functions.inc, line 15 - Collection of functions that don't belong in server object.
Code
function ldap_user_modify($dn, $attributes, $ldap_server) {
$result = ldap_modify($ldap_server->connection, $dn, $attributes);
if (!$result) {
$error = "LDAP Server ldap_modify(%dn) in ldap_user_modify(), LDAP Err No: %ldap_errno LDAP Err Message: %ldap_err2str ";
$tokens = [
'%dn' => $dn,
'%ldap_errno' => ldap_errno($ldap_server->connection),
'%ldap_err2str' => ldap_err2str(ldap_errno($ldap_server->connection)),
];
watchdog('ldap_servers', $error, $tokens, WATCHDOG_ERROR);
}
return $result;
}