Code

Fixed multiple edit for users
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Dec 2007 10:18:05 +0000 (10:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Dec 2007 10:18:05 +0000 (10:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8069 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/users/tabs_user.inc
plugins/personal/generic/class_user.inc

index f0c24635e58ffc525ad0768146e19602ed9579a5..c6565337e4dad2934cb112b70e14698a519f88de 100644 (file)
@@ -96,7 +96,7 @@ class usertabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['user'];
-
+    $baseobject->update_new_dn();
     if ($this->dn != 'new'){
 
       $new_dn= $baseobject->new_dn;
index 16198fe7b33b891b5b334bfd7c82b63098a11fd3..63f9b545ad2f0f4f5a9aa3f9157a46e262e54ffb 100644 (file)
@@ -124,9 +124,7 @@ class user extends plugin
     plugin::plugin ($config, $dn);
 
     $this->orig_dn  = $this->dn;
-    $this->new_dn   = $this->dn;
-
-    $this->new_dn = $dn;
+    $this->new_dn   = $dn;
 
     if ($this->config->current['GOVERNMENTMODE']){
       /* Fix public visible attribute if unset */
@@ -1061,13 +1059,9 @@ class user extends plugin
     return (0);
   }
 
-
-  /* Check formular input */
-  function check()
+  
+  function update_new_dn()
   {
-    /* Call common method to give check the hook */
-    $message= plugin::check();
-
     $pt= "";
     if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
       if(!empty($this->personalTitle)){
@@ -1088,6 +1082,16 @@ class user extends plugin
         $this->new_dn= $this->create_unique_dn('cn', get_people_ou().$this->base);
       }
     }
+  }
+  
+
+  /* Check formular input */
+  function check()
+  {
+    /* Call common method to give check the hook */
+    $message= plugin::check();
+
+    $this->update_new_dn();
 
     /* Set the new acl base */
     if($this->dn == "new") {
@@ -1485,7 +1489,6 @@ class user extends plugin
     $ret['is_modified'] = $this->is_modified;
     $ret['base']=$this->base;
    
-    print_a($ret); 
     return($ret); 
   }
 
@@ -1517,27 +1520,6 @@ class user extends plugin
     /* Call check() to set new_dn correctly ... */
     $message = plugin::multiple_check();
 
-
-
-    $pt= "";
-    if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
-      if(!empty($this->personalTitle)){
-        $pt = $this->personalTitle." ";
-      }
-    }
-    $this->cn= $pt.$this->givenName." ".$this->sn;
-
-    /* Permissions for that base? */
-    if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){
-      $this->new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
-    } else {
-      if($this->orig_base == $this->base ){
-        $this->new_dn= $this->dn;
-      } else {
-        $this->new_dn= $this->create_unique_dn('cn', get_people_ou().$this->base);
-      }
-    }
-
     /* Set the new acl base */
     if($this->dn == "new") {
       $this->set_acl_base($this->base);