if you do 
auth.define_tables(username=True)

a username field is added.

BTW: by "id" we all understood you want to login using the username in the 
registration rather than the email.

If instead you meant "by the serial id associated with the auth_user row" 
then forget about username....



On Monday, May 27, 2013 8:38:30 PM UTC+2, Alec Taylor wrote:
>
> Hmm, that does slightly confuse me. 
>
> Am I supposed to add in a 'username' field? 
>
> This is how the `auth_user` table looks by default, and after 
> registering I tried the value in each column for username; but nothing 
> logged me in: 
>
> CREATE TABLE auth_user( 
>     id INTEGER PRIMARY KEY AUTOINCREMENT, 
>     first_name CHAR(128), 
>     last_name CHAR(128), 
>     email CHAR(512), 
>     password CHAR(512), 
>     registration_key CHAR(512), 
>     reset_password_key CHAR(512), 
>     registration_id CHAR(512) 
> ); 
>
> On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro 
> <massimo....@gmail.com <javascript:>> wrote: 
> > auth.define_tables(username=True) 
> > 
> > 
> > 
> > On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: 
> >> 
> >> El Mon, 27 May 2013 13:00:11 +1000 
> >> Alec Taylor <alec.t...@gmail.com> escribió: 
> >> 
> >> > Is it possible to login to web2py by ID rather than by email? 
> >> > 
> >> > Thanks for all information, 
> >> > 
> >> > Alec Taylor 
> >> > 
> >> 
> >> if you mean something like username yes... and there are some ways to 
> >> hardcode the behaviour for this field to take the id value... 
> >> 
> >> when you define a username field, automatically auth asks for it 
> >> instead of email. 
> >> 
> >> Marco. 
> > 
> > -- 
> > 
> > --- 
> > 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 web2py+un...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to