diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index 27ed27e18fbd1fe019139acfbee6693e9e1fc5ba..00d63536665f531adf1b04c92cdbfe17aab96a3f 100644 (file)
var $edit_uid = "";
var $pwd_change_queue = array();
+ var $force_hash_type = array();
// Tab definition
protected $tabClass = "usertabs";
}
// Change cassword
- if(!change_password ($this->dn, $_POST['new_password'])){
- return($smarty->fetch(get_template_path('password.tpl', TRUE)));
+ if(isset($this->force_hash_type[$this->dn])){
+ if(!change_password ($this->dn, $_POST['new_password'],0,$this->force_hash_type[$this->dn])){
+ return($smarty->fetch(get_template_path('password.tpl', TRUE)));
+ }
+ }else{
+ if(!change_password ($this->dn, $_POST['new_password'])){
+ return($smarty->fetch(get_template_path('password.tpl', TRUE)));
+ }
}
if ($this->config->get_cfg_value("passwordHook") != ""){
exec($this->config->get_cfg_value("passwordHook")." ".$username." ".$_POST['new_password'], $resarr);
function saveChanges()
{
management::saveChanges();
- if($this->last_dn == "new"){
+
+ if(isset($this->last_tabObject->by_object['user']) && $this->last_tabObject->by_object['user']->password_change_needed()){
+ $this->force_hash_type[$this->last_tabObject->dn] = $this->last_tabObject->by_object['user']->pw_storage;
$this->pwd_change_queue[] = $this->last_tabObject->dn;
return($this->handlePasswordQueue());
}
function copyPasteHandler($action="",$target=array(),$all=array(),
$altTabClass ="", $altTabType = "", $altAclCategory="",$altAclPlugin="")
{
- $this->cpHandler->lastdn = "";
- $str = management::copyPasteHandler($action,$target,$all);
- if($this->cpHandler->lastdn != "" && isset($_POST['passwordTodo']) && $_POST['passwordTodo'] == "new"){
- $this->pwd_change_queue[] = $this->cpHandler->lastdn;
- return($this->handlePasswordQueue());
+ if ($this->config->boolValueIsTrue("main", "copyPaste")){
+ $this->cpHandler->lastdn = "";
+ $str = management::copyPasteHandler($action,$target,$all);
+ if($this->cpHandler->lastdn != "" && isset($_POST['passwordTodo']) && $_POST['passwordTodo'] == "new"){
+ $this->pwd_change_queue[] = $this->cpHandler->lastdn;
+ return($this->handlePasswordQueue());
+ }
+ return($str);
}
- return($str);
+
+ return "";
}