fix for changing passwords

This commit is contained in:
skeeter 2001-01-07 03:40:38 +00:00
parent 29a957dcf3
commit fbf40f18ab
2 changed files with 13 additions and 5 deletions

View File

@ -233,11 +233,16 @@
}
if ($account_info["passwd"]) {
$entry["userpassword"] = $phpgw->common->encrypt_password($n_passwd);
// $entry["userpassword"] = $phpgw->common->encrypt_password($n_passwd);
$entry["userpassword"] = $phpgw->common->encrypt_password($account_info["passwd"]);
if ($account_info["account_id"] == $phpgw_info["user"]["account_id"]) {
$phpgw_info["user"]["passwd"] = $phpgw->common->encrypt($account_info["passwd"];
}
// Update the sessions table. (The user might be logged in)
$phpgw->db->query("update sessions set session_pwd='" . $phpgw->common->encrypt($n_passwd) . "' "
. "where session_lid='$lid'",__LINE__,__FILE__);
// $phpgw->db->query("update phpgw_sessions set session_pwd='" . $phpgw->common->encrypt($n_passwd) . "' "
// . "where session_lid='$lid'",__LINE__,__FILE__);
}
while ($permission = each($account_info["permissions"])) {

View File

@ -120,8 +120,11 @@
$phpgw->db->query("update accounts set account_pwd='" . md5($account_info["passwd"]) . "', "
. "account_lastpwd_change='" . time() . "' where account_lid='"
. $account_info["loginid"] . "'");
$phpgw->db->query("update phpgw_sessions set session_pwd='" . addslashes($account_info["passwd"])
. "' where session_lid='" . $account_info["loginid"] . "'");
if ($account_info["account_id"] == $phpgw_info["user"]["account_id"]) {
$phpgw_info["user"]["passwd"] = $phpgw->common->encrypt($account_info["passwd"];
}
// $phpgw->db->query("update phpgw_sessions set session_pwd='" . addslashes($account_info["passwd"])
// . "' where session_lid='" . $account_info["loginid"] . "'");
}
while ($permission = each($account_info["permissions"])) {