[geeklog-devel] New Plugin Wish
Tony Bibbs
tony at tonybibbs.com
Thu Oct 30 13:33:38 EST 2003
Both windows would share the same session.
Tom Willett wrote:
>>You are right, our custom PHP session handler will allow plugins to pass
>>data around.
>>
>>If you want to have a value (or object) just add it to the $_SESSION
>>superglobal:
>>
>>$user = &AEService::Authenticate($userName, $password);
>>$_SESSION['user'] = $user;
>>
>>Then on subsequent page requests you would have access to the user
>>object in the session. Please note if you put objects in session the
>>class definition needs to be included before you bring it out of the
>>session. Also, for GL2 we will need to set some ground rules on what
>>can go in the session. Sessions sizes should be measured in KB not MB.
>>
>>Hope that helps,
>>
>>--Tony
>>
>
> Perfect, just what I was thinking of, that should make things easier and
> cleaner. This would allow a user (even anonymous) to set options that would
> only be valid for their current session and allow the plugin to maintain
> state even when control is passed elsewhere.
>
> And I will agree that we need to keep sessions small -- we also should have
> some guidelines about variable naming in sessions. We don't want multiple
> plugins stuffing things in the same variable like 'user'.
>
> A question about your session handler. If I have a session open and follow
> a link with shift-click do both windows share the have the same session? (I
> ran into this issue with an webmail program.)
>
> TomW
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel
--
+----------------------------------------------------------------------+
|Tony Bibbs |[R]egardless of what you may think of our penal |
|tony at tonybibbs.com |system, the fact is that every man in jail is one |
| |less potential fisherman to clutter up your |
| |favorite pool or pond. --Ed Zern |
+----------------------------------------------------------------------+
More information about the geeklog-devel
mailing list