From 257d99bbd72a80b771919d57f89ac4420a4e8f8e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 1 Dec 2005 13:52:16 +0000 Subject: [PATCH] Fixed base assignment, undefined index error in user->cahngePicture fixed git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2190 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 30e789ffe..8de21f7e6 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -565,11 +565,13 @@ class user extends plugin /* Save base and pw_storage, since these are no LDAP attributes */ if (isset($_POST['base'])){ foreach(array("base", "pw_storage") as $val){ - $data= validate($_POST[$val]); - if ($data != $this->$val){ - $this->is_modified= TRUE; + if(isset($_POST[$val])){ + $data= validate($_POST[$val]); + if ($data != $this->$val){ + $this->is_modified= TRUE; + } + $this->$val= $data; } - $this->$val= $data; } } } @@ -1170,7 +1172,16 @@ class user extends plugin } } } + if(count($allowed) == 0){ + foreach($this->config->idepartments as $key => $dep) { + if($this->base==$key){ + $allowed[$key] = $dep; + } + } + } + return($allowed); + }else{ return($this->config->idepartments); } -- 2.30.2