From 25a85b515af231187de23cedcd8eb0fe25c91a88 Mon Sep 17 00:00:00 2001 From: dangzerong <429714019@qq.com> Date: Wed, 19 Nov 2025 10:57:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=97=B6=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=B8=8D=E5=8C=BA=E5=88=86=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/apps/user_app_fastapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/apps/user_app_fastapi.py b/api/apps/user_app_fastapi.py index 0cefc5c..9fa3f9e 100644 --- a/api/apps/user_app_fastapi.py +++ b/api/apps/user_app_fastapi.py @@ -443,8 +443,9 @@ async def user_add(request: RegisterRequest): detail=f"Invalid email address: {email_address}!" ) - # 检查邮箱地址是否已被使用 - if UserService.query(email=email_address): + # 检查邮箱地址是否已被使用(大小写不敏感) + existing_users = UserService.query_user_by_email_insensitive(email_address) + if existing_users: raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, detail=f"Email: {email_address} has already registered!"