更新v1.4版本,修复了一些已知问题
This commit is contained in:
@@ -296,9 +296,8 @@ class AdminService:
|
||||
if not user:
|
||||
return {"success": False, "message": "未找到对应的用户账号"}
|
||||
|
||||
password_hash = security.sha1_md5_password(new_password)
|
||||
|
||||
result = await UserModel.update_password(user['user_id'], password_hash)
|
||||
# UserModel.update_password 内部会进行哈希,无需预先哈希
|
||||
result = await UserModel.update_password(user['user_id'], new_password)
|
||||
if result:
|
||||
await execute_update(
|
||||
"UPDATE users SET need_change_password = 1 WHERE user_id = %s",
|
||||
|
||||
Reference in New Issue
Block a user