From: hickert Date: Mon, 10 Dec 2007 10:18:05 +0000 (+0000) Subject: Fixed multiple edit for users X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a71b35c610e8ead9b6e07c56beb0f6879086b9f2;p=gosa.git Fixed multiple edit for users git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8069 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index f0c24635e..c6565337e 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -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; diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 16198fe7b..63f9b545a 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -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);