mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Fix banned users having incorrect rank after account deactivation
This commit is contained in:
parent
f1b2465e82
commit
2454738eaa
@ -269,7 +269,9 @@ def delete(username):
|
||||
for thread in user.threads.all():
|
||||
db.session.delete(thread)
|
||||
user.email = None
|
||||
user.rank = UserRank.NOT_JOINED
|
||||
|
||||
if user.rank != UserRank.BANNED:
|
||||
user.rank = UserRank.NOT_JOINED
|
||||
|
||||
msg = "Deactivated user {}".format(user.username)
|
||||
flash(msg, "success")
|
||||
|
Loading…
Reference in New Issue
Block a user