aboutsummaryrefslogtreecommitdiff
path: root/app/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/utils.py')
-rw-r--r--app/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/utils.py b/app/utils.py
index 9be70d6..5fd7cae 100644
--- a/app/utils.py
+++ b/app/utils.py
@@ -62,6 +62,10 @@ def _do_login_user(user, remember_me=False):
if not user:
return False
+ if user.rank == UserRank.BANNED:
+ flash("You have been banned.", "error")
+ return False
+
user.active = True
if not user.rank.atLeast(UserRank.NEW_MEMBER):
user.rank = UserRank.NEW_MEMBER