Two login instances at once

how could i implement two different login instances

i need normal login to users

but i also need other login to admins

and they can login as user and admin at same time

Different db tables: users, admins

will be cool to see Yii support that creating a multi sessions for different logins, example: session[‘user’] session[‘admin’]

is it possible?

thanks

Easier to just have one table of users and have a column with a user type.

Then just allows admin users to do all normal users can too.

You could create another form asking for a password which will elevate user privileges if validated. Kinda like sudo for linux. Then you have to find a way to relegate privileges: when the php session id is destroyed/changed (when browser is closed and reopen), or when it times out.

thanks but that isn’t what want

more suggestions?

thanks

Well Yii is based on php. And when starting a session with php it creates a cookie with the session id, if the cookie already exists it will load the session using the session id. From that point of view it is not possible to have 2 php sessions running at the same time. And the whole yii user stack is based on a single php session. Running 2 parallel sessions is not possible unless using 2 different browsers.

As I mentioned, you can extend the current session and control strictly elevation and relegation of privileges.

http://www.yiiframework.com/forum/index.php?/topic/11882-setstatekeyprefix-and-auto-login-in-modules/page__view__findpost__p__58178

wow thanks!