diff --git a/src/Auth.php b/src/Auth.php index 6dcc016..6ae211b 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -51,13 +51,13 @@ public static function login(array $credentials) } if (static::$settings['AUTH_NO_PASS'] === false) { - $passwordIsValid = true; + $passwordIsValid = false; if (static::$settings['PASSWORD_VERIFY'] !== false && isset($user[$passKey])) { if (is_callable(static::$settings['PASSWORD_VERIFY'])) { $passwordIsValid = call_user_func(static::$settings['PASSWORD_VERIFY'], $password, $user[$passKey]); } else if (static::$settings['PASSWORD_VERIFY'] === Password::MD5) { - $passwordIsValid = (md5($password) === $user[$passKey]); + $passwordIsValid = md5($password) === $user[$passKey]; } else { $passwordIsValid = Password::verify($password, $user[$passKey]); }