On Friday, June 17, 2011 9:38:09 AM UTC-4, Manuele wrote: 
>
> is there a way to add just a single field to the user table without 
> re-wrintig a customized version as explained in 
>
> http://www.web2py.com/book/default/chapter/08#Customizing-Auth 
>
> I mean... if I only want to add "username" field in order to use it in 
> place of email during user login... how can I do it? if I can...
>
Specifically for adding a username field to to be used for login, you can 
do:
 
auth.define_tables(username=True)
 
See http://web2py.com/book/default/chapter/08#Authentication.
 
More generally, as of 1.96.1, you can add custom fields to any auth table 
with:
 
auth.settings.extra_fields['auth_table_name_goes_here'].append(Fields('new_field_name',...))
 
 
Anthony

Reply via email to