From 689bdebbc37ebbf4e4958ce6cc872afeea902a5f Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 26 Dec 2013 11:22:26 +0000 Subject: [PATCH] fix for renaming entries in AD --- lam/lib/modules.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index a513bc0f..a8966d09 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -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) {