I believe this is a bug - it should be consistent - when I state: db.auth_user.email.requires.in**sert(0, IS_LOWER())
On Fri, Dec 16, 2011 at 11:33 AM, Anthony <abasta...@gmail.com> wrote: > When using email as the login username, looks like auth.login() > temporarily replaces the email field validator(s) with just an IS_EMAIL > validator (maybe that should be changed). So, for login, you probably need > to use an onvalidation function to convert to lowercase. > > Anthony > > > On Friday, December 16, 2011 12:14:37 PM UTC-5, thstart wrote: >> >> OK I added this code after database definition: >> >> db.auth_user.email.requires.in**sert(0, IS_LOWER()) >> >> So it is always present with register and login. >> >> Now register is working as expected - e.g. if I >> create first an account with lower case email >> and then try to create an account with same >> email but mixed case, the system does not creates >> a new account. So this important part is working >> now. >> >> But now when I try to login I always have to enter >> lower case, with mixed case the message is >> 'Invalid login'. here is the code: >> >> #auth.settings.login_**onvalidation = *login_email_lower >> *#current.app.auth = auth form=current.app.auth.login(**next=login_next) >> >> >> As you see I commented out login_email_lower and >> >> I suppose I should return it back. >> >> >> def *login_email_lower*(form): form.vars.email = form.vars.email.lower() >> return(form) >> >> >> >> >>