>
> Thanks for the prompt response. Looks like according to the book, using 
> 'username' should be allowed though:
> By default, web2py uses email for login. If instead you want to log in 
> using username set auth.define_tables(username=True)
> Also:
> If you add a field called "username", it will be used in place of "email" 
> for login. If you do, you will need to add a validator as well:
>
> 1.
>
> auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username)
>
>
> (from http://web2py.com/books/default/chapter/29/9)
>

Yes, but in that case, the username is not used to store the email address. 
There must still be an email field *in addition to* the username field. The 
email address is always stored in the "email" field. If you want, you can 
have an optional username field, which can be used for login instead of the 
email field. But it sounds like you want users to log in with their email 
address, so don't bother with the username field.

Anthony 

Reply via email to