Code

Fixed user->move in trunk
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Mar 2007 07:20:32 +0000 (07:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Mar 2007 07:20:32 +0000 (07:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5893 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc

index b02dc292d0d784b007657b037aff418aa2bc1dbe..5e45c80c8cdbced18415d01641c5728172387408 100644 (file)
@@ -23,6 +23,7 @@ class user extends plugin
 
   /* Plugin specific values */
   var $base= "";
+  var $orig_base= "";
   var $cn= "";
   var $new_dn= "";
   var $personalTitle= "";
@@ -203,6 +204,8 @@ class user extends plugin
     if (isset ($this->attrs['gender'])){
       $this->gender= strtoupper($this->attrs['gender'][0]);
     }
+  
+    $this->orig_base = $this->base;
   }
 
 
@@ -1050,7 +1053,8 @@ class user extends plugin
       $this->new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
     } else {
       /* Don't touch dn, if cn hasn't changed */
-      if (isset($this->saved_attributes['cn']) && $this->saved_attributes['cn'] == $this->cn){
+      if (isset($this->saved_attributes['cn']) && $this->saved_attributes['cn'] == $this->cn &&
+          $this->orig_base == $this->base ){
         $this->new_dn= $this->dn;
       } else {
         $this->new_dn= $this->create_unique_dn('cn', get_people_ou().$this->base);