From: hickert Date: Mon, 3 Nov 2008 07:21:32 +0000 (+0000) Subject: Updated user class && password handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=72990298b139dbfc8f06df30e2cb68fdd8410ae9;p=gosa.git Updated user class && password handling -Try to initialize password method with defaults. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12858 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 66464197e..2cbe1f003 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -816,6 +816,20 @@ class user extends plugin } } + if($this->pw_storage != $this->last_pw_storage && isset($_POST['pw_storage'])){ + if ($this->acl_is_writeable("userPassword")){ + $temp= passwordMethod::get_available_methods(); + if (!is_object($this->pwObject) || !($this->pwObject instanceOf $temp[$this->pw_storage])){ + foreach($temp as $id => $data){ + if(isset($data['name']) && $data['name'] == $this->pw_storage && $data['is_configurable']){ + $this->pwObject= new $temp[$this->pw_storage]($this->config,$this->dn); + break; + } + } + } + } + } + /* Save current cn */ $this->cn = $this->givenName." ".$this->sn;