public function LdapBaseManager::modifyLdapEntry in Lightweight Directory Access Protocol (LDAP) 8.4
Modify attributes of LDAP entry.
Parameters
\Symfony\Component\Ldap\Entry $entry: LDAP entry.
Return value
bool Result of query.
File
- ldap_servers/
src/ LdapBaseManager.php, line 282
Class
- LdapBaseManager
- LDAP Base Manager.
Namespace
Drupal\ldap_serversCode
public function modifyLdapEntry(Entry $entry) : bool {
if (!$this
->checkAvailability()) {
return FALSE;
}
// @todo Verify unicodePwd was modified if present through alter hook.
try {
$this->ldap
->getEntryManager()
->update($entry);
} catch (LdapException $e) {
$this->logger
->error("LDAP server error updating %dn on @sid exception: %ldap_error", [
'%dn' => $entry
->getDn(),
'@sid' => $this->server
->id(),
'%ldap_error' => $e
->getMessage(),
]);
return FALSE;
}
return TRUE;
}