RE: [Zope] How can I store session data to db on login/logoff events ?
Thank you Dieter, I see, but i dont't know why the session is empty. When the session will be deleted it is not contains the previously set variables (keys) by the user. Only the request object contains the authenticated user name, the container.session or item parameter contents the "id", "token" values but the content keys is []. -----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Thursday, October 12, 2006 8:54 PM To: Pletli Antal Cc: zope@zope.org Subject: RE: [Zope] How can I store session data to db on login/logoff events ? Pletli Antal wrote at 2006-10-12 08:50 +0200:
But i have a problem with this:
When I ran the test python script (see below) in Zope or I called the url directly from the browser , I got an error:
Error Type: KeyError Error Value: 'SESSION'
The session object is passed as a parameter to the "script when session created" and "script when session deleted" scripts. -- Dieter
Pletli Antal wrote at 2006-10-13 08:36 +0200:
I see, but i dont't know why the session is empty. When the session will be deleted it is not contains the previously set variables (keys) by the user. Only the request object contains the authenticated user name, the container.session or item parameter contents the "id", "token" values but the content keys is [].
That is strange. As you can see "Products.Transience.TransientObjectContainer._do_finalize_work" the session is not cleared before the "notifyDel". The real content might be in "item._container" which you can access with the "TransientObject"s mapping API ("keys", "values", "items", ...) -- Dieter
participants (2)
-
Dieter Maurer -
Pletli Antal