1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-09 19:52:28 +01:00

fix small pw change issue

This commit is contained in:
Chaoyi Zha 2014-11-08 16:19:07 -05:00
parent bb9bd5b73a
commit f2192ab32d

View File

@ -28,19 +28,19 @@ if ($action == 'changepw') {
$hpw = $fetch['password'];
$islegit = $polrauth->processlogin($username, $currpw);
if (!$islegit) {
die('Invalid current password. <a href="forgotpass.php">Forgot your password?</a> <a href="ucp.php">Back</a>');
die('Invalid current password. <a href="admin">Back</a>');
}
$sqr = "UPDATE auth SET password = '{$hashed}' WHERE `username`='{$username}';";
$res = $mysqli->query($sqr);
if ($res) {
require_once 'header.php';
echo "Success! <a href='ucp.php'>Back</a>";
echo "Success! <a href='admin'>Back</a>";
require_once 'footer.php';
die();
} else {
require_once 'header.php';
echo "Error! <a href='ucp.php'>Back</a>";
echo "Error! <a href='admin'>Back</a>";
require_once 'footer.php';
die();
}