aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/forms.py5
-rw-r--r--pyaggr3g470r/templates/management.html2
2 files changed, 5 insertions, 2 deletions
diff --git a/pyaggr3g470r/forms.py b/pyaggr3g470r/forms.py
index fe2dd0d8..d241b90a 100644
--- a/pyaggr3g470r/forms.py
+++ b/pyaggr3g470r/forms.py
@@ -69,8 +69,11 @@ class SigninForm(Form):
return False
user = User.query.filter(User.email == self.email.data).first()
- if user and user.check_password(self.password.data):
+ if user and user.check_password(self.password.data) and user.activation_key == "":
return True
+ elif user.activation_key != "":
+ flash(lazy_gettext('Account not confirmed'), 'danger')
+ return False
else:
flash(lazy_gettext('Invalid email or password'), 'danger')
#self.email.errors.append("Invalid email or password")
diff --git a/pyaggr3g470r/templates/management.html b/pyaggr3g470r/templates/management.html
index 112557d4..6a58919e 100644
--- a/pyaggr3g470r/templates/management.html
+++ b/pyaggr3g470r/templates/management.html
@@ -15,7 +15,7 @@
<div class="col-md-6">
<p>{{ _('Update your') }} <a href="/profile/">{{ _('profile') }}</a>.</p>
<p>{{ _('Member since') }} {{ user.date_created | datetime }}.</p>
- <p>{{ _('Last seen:') }} {{ user.last_seen | datetime }}.{{ user.activation_key }}</p>
+ <p>{{ _('Last seen:') }} {{ user.last_seen | datetime }}.</p>
</div>
<div class="col-md-6">
<img src="{{ user.email | gravatar }}" />
bgstack15