You are here

function ldap_user_modify in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_servers/ldap_servers.functions.inc \ldap_user_modify()
  2. 7 ldap_servers/ldap_servers.functions.inc \ldap_user_modify()

Modify an LDAP Entry

this has been depracated in favor or $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() Error Server ID = %sid, LDAP Err No: %ldap_errno LDAP Err Message: %ldap_err2str ";
    $tokens = array(
      '%dn' => $dn,
      '%sid' => $this->sid,
      '%ldap_errno' => ldap_errno($this->connection),
      '%ldap_err2str' => ldap_err2str(ldap_errno($this->connection)),
    );
    watchdog('ldap_servers', $error, $tokens, WATCHDOG_ERROR);
  }
  return $result;
}