From 8bc46cc53b38af33561d46eedb9d0029efb38ad8 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Sat, 31 Dec 2011 12:00:53 -0600 Subject: [PATCH] issue 586, thanks hi21alt --- VERSION | 2 +- gluon/tools.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9e3c3cfa..c5974c86 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2011-12-31 11:58:15) stable +Version 1.99.4 (2011-12-31 12:00:38) stable diff --git a/gluon/tools.py b/gluon/tools.py index ab2740df..1fd91108 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -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)