[Zope-dev] CoreSessionTracking

Chris McDonough chrism@digicool.com
Mon, 23 Apr 2001 10:55:43 -0400


Alternately (and this will be in the next CST release), add this to the
session data object class (SessionData.SessionData):

__guarded_setitem__ = __setitem__

As far as finding the currently logged in user's name, try this:

context.REQUEST['AUTHENTICATED_USER'].getUserName()

This is a deprecated API, however.  The new one I can't find at the moment,
though.  ;-)

----- Original Message -----
From: "Magnus Heino (Rivermen)" <magnus.heino@rivermen.se>
To: "'Chris McDonough'" <chrism@digicool.com>; "Magnus Heino (Rivermen)"
<magnus.heino@rivermen.se>
Cc: <zope-dev@zope.org>
Sent: Monday, April 23, 2001 10:48 AM
Subject: SV: [Zope-dev] CoreSessionTracking


>
> > In the meantime, use the .set method of the session data
> > object, e.g. in the
> > onStart function:
> >
> > sdo.set('Username', 'Foobar')
> >
> > .. or use an external method.
>
> Ok, works now. Thanks.
>
> How to I access things like the DTML AUTHENTICATED_USER.getUserName() from
a
> python script?
>
> /Magnus
>