From 831f7f0fbc4216861e88c664a2e723be1527a2ac Mon Sep 17 00:00:00 2001 From: niekt0 Date: Thu, 12 Jan 2012 10:18:21 +0100 Subject: [PATCH] reset_passwod final fix --- wwwroot/backend/mysql/backend.inc | 4 ++-- wwwroot/inc/eventz/reset_password.inc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.30.2