Code

Global Base
[gosa.git] / plugins / admin / users / tabs_user.inc
index 899e12d18a1acb7f42e7e44bb7fb36e4578a2ada..5ac4fb7b3a1321b791928caf86904e9f3a2b59a9 100644 (file)
@@ -27,6 +27,13 @@ class usertabs extends tabs
         $this->by_object[$name]= $obj;
       }
 
+      /* Copy mail if needed */
+      if ($name == "gofaxAccount"){
+        if (isset($this->by_object['mailAccount']) && $this->by_object['mailAccount']->is_account){
+          $obj->mail= $this->by_object['mailAccount']->mail;
+        }
+      }
+
       /* Update parent in base object */
       $this->by_object['user']->parent= &$this;
     }
@@ -122,6 +129,16 @@ class usertabs extends tabs
       $this->by_object[$key]->is_template= TRUE;
     }
   }
+  
+  function saveCopyDialog()
+  {
+    tabs::saveCopyDialog();
+    $baseobject= $this->by_object['user'];
+    $uid = $baseobject->uid;
+    foreach($this->by_object as  $name => $obj){
+      $this->by_object[$name]->uid = $uid;
+    }
+  }
 
 }