You are here

function ldap_user_modify in Lightweight Directory Access Protocol (LDAP) 7

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

Modify an LDAP Entry

File

ldap_servers/ldap_servers.functions.inc, line 57
collection of functions that don't belong in server object

Code

function ldap_user_modify($userdn, $attributes, $ldap_server) {
  $status = ldap_modify($ldap_server->connection, $userdn, $attributes);
  if (!$status) {
    watchdog('ldap_servers', 'Error: user_modify() failed to modify ldap entry w/ base DN "!dn" with values: !values', array(
      '!dn' => $userdn,
      '!value' => var_export($attributes, TRUE),
    ), WATCHDOG_ERROR);
  }
  return $status;
}