diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-13 21:20:20 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-13 21:20:20 +0200 |
commit | ca396255e9c8b59a122511436e87f15cae04a9f8 (patch) | |
tree | eecfb87e97f28e7b6507fb23e981bdf33af1f209 /pyaggr3g470r | |
parent | sync (diff) | |
download | newspipe-ca396255e9c8b59a122511436e87f15cae04a9f8.tar.gz newspipe-ca396255e9c8b59a122511436e87f15cae04a9f8.tar.bz2 newspipe-ca396255e9c8b59a122511436e87f15cae04a9f8.zip |
Check if the account has been confirmed.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/forms.py | 5 | ||||
-rw-r--r-- | pyaggr3g470r/templates/management.html | 2 |
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 }}" /> |