check if password exists on login

This commit is contained in:
2023-05-08 21:53:37 +10:00
parent e2efa1f1bd
commit 31820317de

View File

@@ -49,7 +49,7 @@ class AuthController extends ApiController
{
$user = User::where('email', '=', $request->input('email'))->first();
if ($user !== null && Hash::check($request->input('password'), $user->password) === true) {
if ($user !== null && strlen($user->password) > 0 && Hash::check($request->input('password'), $user->password) === true) {
if ($user->email_verified_at === null) {
return $this->respondWithErrors([
'email' => 'Email address has not been verified.'