From: niekt0 Date: Thu, 12 Jan 2012 09:18:21 +0000 (+0100) Subject: reset_passwod final fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=831f7f0fbc4216861e88c664a2e723be1527a2ac;p=mirrors%2FKyberia-bloodline.git reset_passwod final fix --- diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index 4bdcc8c..bf4c80d 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -715,10 +715,10 @@ public static function resetPassword($login_id,$login,$vercode,$password) { return $error; } - if ($login_id = 0) { + if ($login_id == 0) { $set=$db->query("select * from users where login='$login'"); } else { - $set=$db->query("select * from users where user_id='$login'"); + $set=$db->query("select * from users where user_id='$login_id'"); } $set->next(); diff --git a/wwwroot/inc/eventz/reset_password.inc b/wwwroot/inc/eventz/reset_password.inc index 3c5f205..ecaae40 100644 --- a/wwwroot/inc/eventz/reset_password.inc +++ b/wwwroot/inc/eventz/reset_password.inc @@ -9,16 +9,19 @@ function reset_password() { if ($login == '') { $error="Please enter name or id"; + print "$error"; return false; } if ($password1 == '' || $password2 == '') { $error="Please enter password"; + print "$error"; return false; } if ($password1 != $password2) { $error = "The two passwords that you entered do not match."; + print "$error"; return false; }