Depends on how you have customized the login. If you want to create a completely custom form and workflow, you can use auth.login_bare() to do the login -- it returns False if the login fails. If you want to use auth.login(), upon login failure, it automatically redirects back to the login page and displays a flash message. You can customize the flash message via auth.messages.invalid_login.
Anthony On Saturday, February 15, 2014 11:32:58 AM UTC-5, desta wrote: > > Hello, > > I am building a custom *Login *form and I want to warn the user if > his/her username/pass are wrong. How can I detect this? > I tried through *form.errors* but its not there. I can understand that > since its not error of the form but of authentication. > > Thank you. > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

