mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-24 23:11:33 +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():
|
for thread in user.threads.all():
|
||||||
db.session.delete(thread)
|
db.session.delete(thread)
|
||||||
user.email = None
|
user.email = None
|
||||||
user.rank = UserRank.NOT_JOINED
|
|
||||||
|
if user.rank != UserRank.BANNED:
|
||||||
|
user.rank = UserRank.NOT_JOINED
|
||||||
|
|
||||||
msg = "Deactivated user {}".format(user.username)
|
msg = "Deactivated user {}".format(user.username)
|
||||||
flash(msg, "success")
|
flash(msg, "success")
|
||||||
|
Loading…
Reference in New Issue
Block a user