reset_passwod final fix
authorniekt0 <niekt0@kyberia.cz>
Thu, 12 Jan 2012 09:18:21 +0000 (10:18 +0100)
committerniekt0 <niekt0@kyberia.cz>
Thu, 12 Jan 2012 09:18:21 +0000 (10:18 +0100)
wwwroot/backend/mysql/backend.inc
wwwroot/inc/eventz/reset_password.inc

index 4bdcc8c0d8568f5455ae9bb9847e338708f93b7b..bf4c80d806c2b37c4ea16954d5b23845d776663d 100644 (file)
@@ -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();
index 3c5f205ce43c5a58c3c4f2cef3f7d8c8e9a5251b..ecaae400660b6cfb2f55e9104bd1b3c5dfe3c6a3 100644 (file)
@@ -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;
        }
 
This page took 0.198374 seconds and 4 git commands to generate.