Check that email is not empty upon password reset
authorAlexander Solovyov <piranha@piranha.org.ua>
Fri Oct 17 15:19:36 2008 +0300 (7 days ago)
changeset 10559e96b58e0179
parent 105499f39a118795
child 1056d84a54042a22
Check that email is not empty upon password reset
apps/accounts/views.py
       1 --- a/apps/accounts/views.py	Thu Oct 16 23:34:22 2008 +0300
       2 +++ b/apps/accounts/views.py	Fri Oct 17 15:19:36 2008 +0300
       3 @@ -83,6 +83,8 @@
       4          return {'success': _(u'Password succesfully resetted. Message with new password was sent to your email.')}
       5      else:
       6          if request.method == 'POST':
       7 +            if not request.POST['email']:
       8 +                return {'error': _(u'Please enter email.')}
       9              try:
      10                  user = User.objects.filter(is_active=True).get(email__iexact=request.POST['email'])
      11                  ActionRecord.resets.create_password_reset(user)