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

View File

@@ -29,7 +29,7 @@ class CommController extends Controller
// 检查白名单后缀限制
if ((int) admin_setting('email_whitelist_enable', 0)) {
$isRegisteredEmail = User::where('email', $email)->exists();
$isRegisteredEmail = User::byEmail($email)->exists();
if (!$isRegisteredEmail) {
$allowedSuffixes = Helper::getEmailSuffix();
$emailSuffix = substr(strrchr($email, '@'), 1);