From 72990298b139dbfc8f06df30e2cb68fdd8410ae9 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 3 Nov 2008 07:21:32 +0000 Subject: [PATCH] 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 --- gosa-core/plugins/personal/generic/class_user.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; -- 2.30.2