Code

Hide php errors
[gosa.git] / plugins / admin / users / class_userManagement.inc
index e1330e8855aadfac02c61655554613b10da35df0..b1b1d303da7768fa20c1fa167c94247929ede3b5 100644 (file)
@@ -593,13 +593,17 @@ class userManagement extends plugin
       $this->usertab->givenName = $this->givenName;
       $template_dn              = $_POST['template'];
       $this->usertab->adapt_from_template($template_dn);
-      $template_base            = $userfilter['depselect'];//preg_replace("/^[^,]+,".get_people_ou()."/", '', $template_dn);
+      $template_base            = preg_replace("/^[^,]+,".get_people_ou()."/", '', $template_dn);
       $this->usertab->by_object['user']->base= $template_base;
 
       /* Set up the users ACL's for this 'dn' */
       $acl= get_permissions ($template_base, $this->ui->subtreeACL);
       $this->usertab->set_acl($acl);
     }
+    
+    if (isset($_POST['template_continue']) && ($_POST['template'] == 'none')){
+      $this->usertab->by_object['user']->base= $userfilter['depselect'];
+    }
 
     /* Show tab dialog if object is present */
     if ($this->usertab){