-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Austin Denyer wrote:
> Stut wrote:
>> I'm confused as to why you need a solution to this 'problem'. How likely
>> is it that you'll have 2 users trying to access your site on the same
>> machine at the same time? If it is likely (although I don't see how)
>> then you need to design your session data as an array keyed on the
>> username, but that would be very insecure.
>>
>> In short are you trying to solve a perceived problem when no such
>> problem actually exists? Think about it for a while before jumping to
>> working around it.
> 
> There are times when it's handy, but not often.
> 
> For example, when I'm debugging my code it is useful to be able to log
> into my application's admin module (which uses sessions to ensure admin
> rights) without blowing away my user session.
> 
> In my case, I flick between Firefox and Konqueror.

I do this by giving the admin session a custom name. That way it doesn't
trample over the user session.

> It would be nice to be able to separate the sessions generally though.
> The case where you have several accounts is just one example.

If this is the case you want to handle then having a single session var
which is an array of arrays of session vars keyed on the username will
solve this problem, but it's your choice to needlessly over-complicate
the situation. Personally I think it's reasonable to expect people to
log out of one account before they can log in with another.

- -Stut
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEtVdO2WdB7L+YMm4RAntrAKDQoIdN8uTr3WSQygxPvq7zE+a5AACgzWEr
BL/5GBUoopy+RNY6Emq7BLQ=
=okNy
-----END PGP SIGNATURE-----

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to