no changes should be required to any controller or view. Everything is handled by the line: return dict(form=auth())
in the default controller (in combination with the default/user.html). The line in db.py just tells auth whether to use a username or email. On Wednesday, March 23, 2016 at 8:16:42 PM UTC-4, Jerry Liu wrote: > > Not sure if I understood, you mean I still have to make changes on View > and Controller, right? > because adding this line doesn't change anything on login and registration > views. > > On Wednesday, March 23, 2016 at 4:12:49 PM UTC-7, Michael Beller wrote: >> >> It's easier than that ... just change username=True in db.py, all the >> web2py components (e.g., log in form, auth_user table, log in menu, etc.) >> will now support username ... >> >> auth.define_tables(username=True, signature=True) >> >> >> >> On Wednesday, March 23, 2016 at 5:46:38 PM UTC-4, Jerry Liu wrote: >>> >>> Hello, all >>> >>> I want to add a *username* field to auth_user table. I figured out I >>> can use the following line of code to do so, but how can I use *username >>> *instead of *email *in login and registration process? >>> >>> auth.settings.extra_fields[auth.settings.table_user_name] = [ Field] >>> >>> >>> -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.