0011148: Renaming a group is not renaming the group in ldap
authorsstamer <s.stamer@metaways.de>
Mon, 6 Jul 2015 10:37:53 +0000 (12:37 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 15 Jul 2015 14:20:16 +0000 (16:20 +0200)
https://forge.tine20.org/view.php?id=11148

Change-Id: I4db651d4a9c31f17b45f0935e52c6a53161ceab3
Reviewed-on: http://gerrit.tine20.com/customers/2010
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Group/Ldap.php

index 4809542..7139977 100644 (file)
@@ -625,6 +625,11 @@ class Tinebase_Group_Ldap extends Tinebase_Group_Sql implements Tinebase_Group_I
         
         $this->getLdap()->update($dn, $ldapData);
         
+        if ($metaData['cn'] != $ldapData['cn']) {
+            $newDn = "cn={$ldapData['cn']},{$this->_options['groupsDn']}";
+            $this->_ldap->rename($dn, $newDn);
+        }
+        
         $group = $this->getGroupByIdFromSyncBackend($_group);
 
         return $group;