diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-10-08 13:58:02 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-10-08 13:58:02 -0500 |
commit | 6180e3a915f4484e970e6d776740b2da58b12f94 (patch) | |
tree | d7fbd8a8ddffe8748be653b725ccc474c03bad33 | |
parent | fce8e96979b1bdf4fb2357e463b79056b3a583ba (diff) | |
download | mediagoblin-6180e3a915f4484e970e6d776740b2da58b12f94.tar.lz mediagoblin-6180e3a915f4484e970e6d776740b2da58b12f94.tar.xz mediagoblin-6180e3a915f4484e970e6d776740b2da58b12f94.zip |
Fixing up the email verified stuff to reflect the email_verified stuff!
This commit sponsored by Derek Holdaway. Thanks!
-rw-r--r-- | mediagoblin/plugins/basic_auth/views.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/mediagoblin/plugins/basic_auth/views.py b/mediagoblin/plugins/basic_auth/views.py index d0941ae5..47f7ee9a 100644 --- a/mediagoblin/plugins/basic_auth/views.py +++ b/mediagoblin/plugins/basic_auth/views.py @@ -68,7 +68,7 @@ def forgot_password(request): success_message = _("An email has been sent with instructions " "on how to change your password.") - if user and not(user.email_verified and user.status == 'active'): + if user and user.has_privilege(u'active') is False: # Don't send reminder because user is inactive or has no verified email messages.add_message(request, messages.WARNING, @@ -125,8 +125,7 @@ def verify_forgot_password(request): request, 'index') # check if user active and has email verified - if user.email_verified and user.status == 'active': - + if user.has_privilege(u'active'): cp_form = forms.ChangeForgotPassForm(formdata_vars) if request.method == 'POST' and cp_form.validate(): @@ -145,11 +144,18 @@ def verify_forgot_password(request): 'mediagoblin/plugins/basic_auth/change_fp.html', {'cp_form': cp_form}) - if not user.email_verified: - messages.add_message( - request, messages.ERROR, - _('You need to verify your email before you can reset your' - ' password.')) + ## Commenting this out temporarily because I'm checking into + ## what's going on with user.email_verified. + ## + ## ... if this commit lasts long enough for anyone but me (cwebber) to + ## notice it, they should pester me to remove this or remove it + ## themselves ;) + # + # if not user.email_verified: + # messages.add_message( + # request, messages.ERROR, + # _('You need to verify your email before you can reset your' + # ' password.')) if not user.status == 'active': messages.add_message( |