mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:07 +01:00
moved change_password code to the auth class where it belongs
This commit is contained in:
parent
534337b237
commit
75c26a23fe
@ -25,7 +25,7 @@
|
||||
}
|
||||
function change_password($old_passwd, $new_passwd) {
|
||||
global $phpgw_info, $phpgw;
|
||||
return $old_passwd;
|
||||
return False;
|
||||
}
|
||||
}
|
||||
?>
|
@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
$encrypted_passwd = $phpgw->common->encrypt_password($new_passwd);
|
||||
$entry["userpassword"] = $encrypted_passwd
|
||||
$entry["userpassword"] = $encrypted_passwd;
|
||||
$entry["phpgw_lastpasswd_change"] = time();
|
||||
|
||||
$dn = $phpgw_info["user"]["account_dn"];
|
||||
|
@ -41,7 +41,7 @@
|
||||
}
|
||||
function change_password($old_passwd, $new_passwd) {
|
||||
global $phpgw_info, $phpgw;
|
||||
return $old_passwd;
|
||||
return False;
|
||||
}
|
||||
}
|
||||
?>
|
@ -74,10 +74,14 @@
|
||||
}
|
||||
|
||||
$o_passwd = $phpgw_info["user"]["passwd"];
|
||||
$passwd_changed = $phpgw->auth->change_password($o_passwd, $n_passwd);
|
||||
if (!$passwd_changed){
|
||||
// This need to be changed to show a different message based on the result
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/"));
|
||||
}else{
|
||||
$phpgw_info["user"]["passwd"] = $phpgw->auth->change_password($o_passwd, $n_passwd);
|
||||
|
||||
$phpgw->accounts->sync();
|
||||
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/","cd=18"));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user