fix for renaming entries in AD

This commit is contained in:
Roland Gruber 2013-12-26 11:22:26 +00:00
parent f56b723e60
commit 689bdebbc3
1 changed files with 4 additions and 0 deletions

View File

@ -1791,6 +1791,10 @@ class accountContainer {
$removeOldRDN = true;
unset($attributes[$this->finalDN]['modify'][extractRDNAttribute($this->finalDN)]);
}
if (isset($attributes[$this->finalDN]['notchanged'][$rdnAttr])) {
// fix for AD which requires to remove RDN even if not changed
$removeOldRDN = true;
}
logNewMessage(LOG_DEBUG, 'Rename ' . $this->dn_orig . ' to ' . $this->finalDN);
$success = ldap_rename($_SESSION['ldap']->server(), $this->dn_orig, $this->getRDN($this->finalDN), $this->getParentDN($this->finalDN), $removeOldRDN);
if ($success) {