Code

Speed improvements
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Sep 2006 06:32:40 +0000 (06:32 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Sep 2006 06:32:40 +0000 (06:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4649 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 56fa2a65209bff251f45b5ddef6430b69f700ca1..ae564be6bdd1b7c592dd29686e6303c61fdd0c10 100644 (file)
@@ -875,10 +875,12 @@ class posixAccount extends plugin
 
     /* Take care about groupMembership values: add to groups */
     foreach ($this->groupMembership as $key => $value){
-      $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key,"groups");
-      $g->set_acl_base($key);
-      $g->by_object['group']->addUser($this->uid);
-      $g->save();
+      if (!isset($this->savedGroupMembership[$key])){
+        $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key,"groups");
+        $g->set_acl_base($key);
+        $g->by_object['group']->addUser($this->uid);
+        $g->save();
+      }
     }
 
     /* Remove from groups not listed in groupMembership */