Code

Fixed GroupMail saving ... :
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Mar 2006 09:06:14 +0000 (09:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Mar 2006 09:06:14 +0000 (09:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2801 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 66d47eb913699959c3ad785bdb181b3ad8ba6a65..4df3640f4a66d4f766388d9deb49ba5f0cabec86 100644 (file)
@@ -853,29 +853,17 @@ $ldap->modify ($this->attrs);
 
     /* Take care about groupMembership values: add to groups */
     foreach ($this->groupMembership as $key => $value){
-      $g= new group($this->config, $key);
-      $g->addUser ($this->uid);
+      $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key);
+      $g->by_object['group']->addUser ($this->uid);
       $g->save();
-
-      /* May need to save the mail part, too */
-      if ($g->has_mailAccount){
-        $m= new mailgroup($this->config, $key);
-        $m->save();
-      }
     }
 
     /* Remove from groups not listed in groupMembership */
     foreach ($this->savedGroupMembership as $key => $value){
       if (!array_key_exists ($key, $this->groupMembership)){
-        $g= new group($this->config, $key);
-        $g->removeUser ($this->uid);
+        $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key);
+        $g->by_object['group']->removeUser ($this->uid);
         $g->save();
-
-        /* May need to save the mail part, too */
-        if ($g->has_mailAccount){
-          $m= new mailgroup($this->config, $key);
-          $m->save();
-        }
       }
     }