Permalink
Browse files

Merge pull request #38 from nduthoit/master

Fix issue with recently committed account code when EMAIL_AUTHENTICATION is True
  • Loading branch information...
2 parents ef8961f + cd709d5 commit 8ee4edb6bafa1909d888af2cf11983231ae98c1b @lukeman lukeman committed Jan 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 pinax/apps/account/forms.py
View
6 pinax/apps/account/forms.py
@@ -101,7 +101,11 @@ def clean(self):
def is_valid(self, *args, **kwargs):
result = super(LoginForm, self).is_valid(*args, **kwargs)
- user_login_attempt.send(sender=LoginForm, username=self.data["username"], result=result)
+ if EMAIL_AUTHENTICATION:
+ username = self.data["email"]
+ else:
+ username = self.data["username"]
+ user_login_attempt.send(sender=LoginForm, username=username, result=result)
return result
def login(self, request):

0 comments on commit 8ee4edb

Please sign in to comment.