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)" <[EMAIL PROTECTED]>
To: "'Chris McDonough'" <[EMAIL PROTECTED]>; "Magnus Heino (Rivermen)"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
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
>


_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to