mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 17:24:10 +00:00
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:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user