I asked this question a while ago and thought I would have another go at it. Would it be possible to log 2 people in at the same time (I know it is possible, it is the how I am having issues with). What I need to do is have a user login, and then maybe a manger login. If a manager logs in after the user, I need the prividges to reflect both the user and manager.
So for example if I was to check a role, it would check both the User and the Managers rolls instead of just the user. Need to get a manager to login to perform specific tasks for a user without loosing the default user (the first logged in user) identitiy in the system for obvious DB purposes.
How about, having another form for a manager login. Manager logs in and sets a new session variable with that ID call it managerId.
Overide the $user->can, and before checking access, check if manager is logged in and pass that ID to check access. Or call check access twice, once for manager and once for user, if either is true, set $access to whoever passed. This requires a double hit against the DB. Though I guess, a manager in theory should have all the rights of a user and should only check the rights of the manager.