Login with 2 tables

hi, I want to make login pages: one for member and one for admin. each of login uses its own table for authenticating. is it possible to make them and how?. since Yii just uses one table to validate login process in an example i have read.

thanks. sorry for my bad english.^_^

even though i don’t really understand why you want to create two different login pages, yes, it’s possible :)

i mean, if you take a look at the default login structure you’ll see that login mainly consists of:

1 - components/UserIdentity class

2 - models/LoginForm (which references UserIdentity)

3 - views/site/login

4 - action login in controllers/SiteController

all the objects are related, so, if you create two different login pages, you’d duplicate all these objects and change little pieces of code inside them

imho, its too much work to do, please, let us now what you want to achieve by using this approach and maybe we could suggest another one

:)

regards!!!

thanks for your fast reply.

yes, these all what i need and yes i have lot work to do. because the number of member in my site is arround 10.000 and the admin user is just about ten peoples, so i think it’s more efficient to manage and doing query. beside that, admin and member have different access roles. any suggest?

i hope you understand my reason. thanks

I doubt you will notice any performance query a user with “only” 10.000 records if they have an index :)

for access roles, i’d suggest you to use RBAC or even better the extension srbac

:)

@mech7: but i think it is better to use two tables :D

@scoob.junior: thanks, I’ll try it soon