mirror of
https://github.com/tgbot-collection/YYeTsBot.git
synced 2025-11-25 03:15:05 +08:00
暂停注册的功能
This commit is contained in:
2
YYeTsFE
2
YYeTsFE
Submodule YYeTsFE updated: c65f7784d8...b2792904c4
@@ -721,6 +721,9 @@ class UserMongoResource(UserResource, Mongo):
|
||||
returned_value["message"] = "用户名或密码错误"
|
||||
|
||||
else:
|
||||
if os.getenv("DISABLE_REGISTER"):
|
||||
return {"status_code": HTTPStatus.BAD_REQUEST, "message": "本站已经暂停注册"}
|
||||
|
||||
# register
|
||||
hash_value = pbkdf2_sha256.hash(password)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user