If there aren't too many fields, it might just be easiest to put them all 
in auth_user and just make some conditionally readable/writable depending 
on the type of user. Otherwise, you could create separate profile tables 
and have them reference auth_user. In that case, you would have to create 
your own register/profile actions, as web2py Auth won't handle the separate 
tables for you.

Finally, it might be possible for you to conditionally change the names of 
the Auth tables based on user type: 
http://web2py.com/books/default/chapter/29/09/access-control#Renaming-Auth-tables.
 
However, you would have to be able to identify the user type *prior* to 
registration/login (e.g., based on some identifier in the URL), as the Auth 
table names must be determined in order to process any Auth actions.

Anthony

On Monday, February 1, 2016 at 12:30:04 AM UTC-5, [email protected] 
wrote:
>
>
> Hello web2py community. I am a new user and I have to say, web2py saves 
> the day by saving so much time over a full stack framework which requires 
> so much work. Anyway, going to ask a question tothe community. How to 
> custom create auth_user so instead of adding extra fields to the auth_user 
> we can have multiple tables for the profile with various attributes. I am 
> creating an application for gym membership and I need to have the user 
> register based on their job, current address, prior fitness routines, 
> current fitness routine, activities they are interested...etc. Put all in 
> one tables with various fields seems make a table disproportionately long. 
> Would be nice to split them to different tables and user can pick and 
> choose which tables they like to fill up or they don't. 
>

-- 
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