Worked for me the following code:
if 'login' in request.args:
auth.settings.login_userfield = 'username'
if request.vars.username and not
IS_EMAIL()(request.vars.username)[1]:
auth.settings.login_userfield = 'email'
request.vars.email = request.vars.username
request.post_vars.email = request.vars.email
request.vars.username = None
request.post_vars.username = None
return dict(form=auth.login())
Em sexta-feira, 9 de dezembro de 2011 10h22min57s UTC-2, Francisco Costa
escreveu:
>
> lots of users on login form submit their email instead of the
> username..
>
> it seems that auth.define_tables(username=True) forces username login
> but it is possible to have both?
>
--
---
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.