Well it depends what you have in mind.
But as you're in a hurry, I've made all the choice for you :)
Only have one set of auth tables.
Make all the extra fields you need for both users and admin guys.
Make different profile forms for them to complete.
Make sure they are given membership of different groups (roles).
Generate a few random characters and suffix the id number to avoid
collisions.
Create the users something like this:
db.auth_user.insert(
username="asdfasd1",
first_name="",
last_name="",
email="[email protected]",
password=db.auth_user.password.requires[0]('mysecret1')[0]
)
Add membership like this:
auth.add_membership('admin', db.auth_user(1))
To log them in straight-away do this:
auth.login_bare('[email protected]','mysecret1')
Email the login credentials to your users.
Hope that helps a little to inspire your further thoughts.
Regards, D
On Tuesday, September 11, 2012 8:58:23 PM UTC+1, Pystar wrote:
>
> In the application I am developing, I would like to know if I can have 2
> auth tables in it? The reason is that I would like to have ordinary users
> that would use the auth_user table with some
> extra fields added and then an admin table with some unique fields. How do
> I go about implementing something like this? Also I would like to
> autogenerate a username and password for users whenever they try to
> register for my app. How do I do this too?
> I need help on this like yesterday. Thanks
>
--