Fix case-sensitive email login

Email comparison on login now uses LOWER() for case-insensitive
matching. Applied to both admin and customer portal login controllers.

Fixes #424
This commit is contained in:
Darko Gjorgjijoski
2026-04-06 23:22:16 +02:00
parent 8508e7e1b8
commit 25b61b73a0
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ class AuthController extends Controller
{
public function login(LoginRequest $request)
{
$user = User::where('email', $request->username)->first();
$user = User::whereRaw('LOWER(email) = ?', [strtolower($request->username)])->first();
if (! $user || ! Hash::check($request->password, $user->password)) {
throw ValidationException::withMessages([