[Zope] Help with accesssing session information

Karl Munroe mun_rok@yahoo.com
Thu, 7 Mar 2002 10:10:31 -0500


I need help with finding out how do I use sessions in zope

from asp I can use the Session object to track a user with the SessionId
identifying the users unique session on the server.

I was looking at the API reference and came up with the fillowing :
****************************************************************************
*********************
module SessionInterfaces
Session API
See Also

Transient Object API
class SessionDataManagerErr
Error raised during some session data manager operations, as explained in
the API documentation of the Session Data Manager.

This exception may be caught in PythonScripts. A successful import of the
exception for PythonScript use would need to be:

         from Products.Sessions import SessionDataManagerErr

class BrowserIdManagerInterface
Zope Browser Id Manager interface.

A Zope Browser Id Manager is responsible for assigning ids to site visitors,
and for servicing requests from Session Data Managers related to the browser
id.

getBrowserId(self, create=1)
If create=0, returns a the current browser id or None if there is no browser
id associated with the current request. If create=1, returns the current
browser id or a newly-created browser id if there is no browser id
associated with the current request. This method is useful in conjunction
with getBrowserIdName if you wish to embed the browser-id-name/browser-id
combination as a hidden value in a POST-based form. The browser id is
opaque, has no business meaning, and its length, type, and composition are
subject to change.

Permission required: Access contents information

Raises: BrowserIdManagerErr if ill-formed browser id is found in REQUEST.

isBrowserIdFromCookie(self)
Returns true if browser id comes from a cookie.

Permission required: Access contents information

Raises: BrowserIdManagerErr. If there is no current browser id.

isBrowserIdNew(self)
Returns true if browser id is new. A browser id is new when it is first
created and the client has therefore not sent it back to the server in any
request.

Permission required: Access contents information

Raises: BrowserIdManagerErr. If there is no current browser id.
****************************************************************************
**********************

Where can I find more documentation? Is there anyway I can make use of these
modules and classes by calling them from dtml method or document? I can
probably use these to simulate tracking by session, am I too wishful in my
thinking? The problem is I do not want to install a product with user
management such as Cookieuser folder.

I am currently using zope 2.3.3.....wanted to wrk with this one, I am going
to upgrade soon.

Thanks in advance.

Karl Munroe
Email : mun_rok@yahoo.com, mun_rok@hotmail.com
Tel: (876)3654340



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com