issue 586, thanks hi21alt

This commit is contained in:
Massimo Di Pierro
2011-12-31 12:00:53 -06:00
parent ee2f40c884
commit 8bc46cc53b
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2011-12-31 11:58:15) stable
Version 1.99.4 (2011-12-31 12:00:38) stable
+2 -1
View File
@@ -1619,7 +1619,8 @@ class Auth(object):
username = 'username'
else:
username = 'email'
if username in table_user.fields or not self.settings.login_email_validate:
if 'username' in table_user.fields or \
not self.settings.login_email_validate:
tmpvalidator = IS_NOT_EMPTY(error_message=self.messages.is_empty)
else:
tmpvalidator = IS_EMAIL(error_message=self.messages.invalid_email)