check for form.password in the off chance that a user is logged in and the server switches the authentication method from basic_auth to openid.

This commit is contained in:
Rodney Ewing 2013-07-12 12:27:41 -07:00
parent 402f436011
commit 5a6e4e1307

View File

@ -444,7 +444,7 @@ def change_email(request):
_('Sorry, a user with that email address'
' already exists.'))
if user.pw_hash and not auth.check_password(
if form.password and user.pw_hash and not auth.check_password(
form.password.data, user.pw_hash):
form.password.errors.append(
_('Wrong password'))