feat: implement email case-insensitive queries (fix #318)

This commit is contained in:
xboard
2026-03-28 07:07:57 +08:00
parent a6c37bb112
commit 7fbd1bb92d
9 changed files with 64 additions and 11 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ class LoginService
}
// 查找用户
$user = User::where('email', $email)->first();
$user = User::byEmail($email)->first();
if (!$user) {
return [false, [400, __('Incorrect email or password')]];
}
@@ -99,7 +99,7 @@ class LoginService
}
// 查找用户
$user = User::where('email', $email)->first();
$user = User::byEmail($email)->first();
if (!$user) {
return [false, [400, __('This email is not registered in the system')]];
}