It is a feature. ;-) 
If the auth_user table has a username, it uses the username to ID the user 
instead of the email. 

Mind that on-login you can always pass the email in place of the username 
and it will work.
Anyway, if you do not want this and you want a field called username that 
does not act as  username you can do:

auth.settings.extra_fields['auth_user'] = [Field('user_name', length=128, 
default="", unique=True,label='username')]



On Saturday, 21 March 2015 15:21:17 UTC-5, Sébastien Loix wrote:
>
> Hello,
>
> I can't get the username=False inside the auth.define_tables to work while 
> developing on GAE locally.
>
> I need to add a custom field "username" in the auth table that I do like 
> this:
>
> auth.settings.extra_fields['auth_user'] = [Field('username', length=128, 
> default="", unique=True)]
>
> then below I have:
> auth.define_tables(username=False, signature=False)
>
> When I try to login (going to /user/login)
>
> I have the form with 
> username:
> password:
>
> The only way I get the login with the email / password is if I remove the 
> custom extra_field 'username'.
>
> Any idea why this is happening?
>
> Thank you for the help,
> Sebastian
>

-- 
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/d/optout.

Reply via email to