From 669ff2d6cbcc6e184610e3923dd6cf648a2bcbd5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 Mar 2007 07:25:02 +0000 Subject: [PATCH] Fixed user move check. The check was always false, cause $this->saved_attributes['base'] is never set. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5894 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index cf43e10da..9749942d5 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -18,6 +18,7 @@ class user extends plugin /* Plugin specific values */ var $base= ""; + var $orig_base= ""; var $cn= ""; var $new_dn= ""; var $personalTitle= ""; @@ -198,6 +199,8 @@ class user extends plugin if (isset ($this->attrs['gender'])){ $this->gender= strtoupper($this->attrs['gender'][0]); } + + $this->orig_base = $this->base; } @@ -1002,9 +1005,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 - && (isset($this->saved_attributes['base']) && $this->saved_attributes['base'] == $this->base ) - ){ + 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); -- 2.30.2