aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index ee610840..78523d56 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -782,12 +782,12 @@ def disable_user(user_id=None):
"""
user = User.query.filter(User.id == user_id).first()
if user is not None:
- if True:
- user.activation_key = ""
+ if user.activation_key != "":
# Send the confirmation email
try:
emails.new_account_activation(user)
+ user.activation_key = ""
except Exception as e:
flash(gettext('Problem while sending activation email') + ': ' + str(e), 'danger')
bgstack15