mirror of
https://github.com/lkddi/Xboard.git
synced 2026-05-18 05:37:29 +08:00
feat: implement email case-insensitive queries (fix #318)
This commit is contained in:
@@ -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')]];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user