[geeklog-devel] New Plugin Wish
tomw at pigstye.net
Thu Oct 30 12:02:41 EST 2003
> 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
> $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,
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.)
More information about the geeklog-devel