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
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
Chris McDonough wrote:
Alternately (and this will be in the next CST release), add this to the session data object class (SessionData.SessionData):
__guarded_setitem__ = __setitem__
OK, that'll teach me to read the whole thread before I post :-)
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. ;-)
When you find out, can you let us know :-S Chris
participants (3)
-
Chris McDonough -
Chris Withers -
Magnus Heino (Rivermen)