feat: allow same phone number to register multiple users

This commit is contained in:
yumoqing 2026-07-16 16:21:36 +08:00
parent ed837dcd4e
commit be26c6db98

View File

@ -92,18 +92,6 @@ db = DBPools()
dbname = get_module_dbname('rbac') dbname = get_module_dbname('rbac')
try: try:
async with db.sqlorContext(dbname) as sor: async with db.sqlorContext(dbname) as sor:
# 检查手机号是否已注册
existing = await sor.R('users', {'mobile': mobile})
if existing:
return {
"widgettype": "Error",
"options": {
"timeout": 5,
"title": "注册失败",
"message": "该手机号已注册,请直接登录"
}
}
# 检查用户名是否已存在 # 检查用户名是否已存在
existing_user = await sor.R('users', {'username': username}) existing_user = await sor.R('users', {'username': username})
if existing_user: if existing_user: