fix: always authenticate with lowercase emails

This commit is contained in:
Andras Bacsai
2024-11-03 16:14:25 +01:00
parent d3f422a7fb
commit b8a35be095

View File

@@ -75,7 +75,8 @@ class FortifyServiceProvider extends ServiceProvider
});
Fortify::authenticateUsing(function (Request $request) {
$user = User::where('email', $request->email)->with('teams')->first();
$email = strtolower($request->email);
$user = User::where('email', $email)->with('teams')->first();
if (
$user &&
Hash::check($request->password, $user->password)