moved change_password code to the auth class where it belongs

This commit is contained in:
seek3r 2001-01-04 20:29:28 +00:00
parent 534337b237
commit 75c26a23fe
4 changed files with 22 additions and 18 deletions

View File

@ -25,7 +25,7 @@
}
function change_password($old_passwd, $new_passwd) {
global $phpgw_info, $phpgw;
return $old_passwd;
return False;
}
}
?>

View File

@ -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"];

View File

@ -41,7 +41,7 @@
}
function change_password($old_passwd, $new_passwd) {
global $phpgw_info, $phpgw;
return $old_passwd;
return False;
}
}
?>

View File

@ -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"));
}
}
?>