[Zope-dev] User Name in python script

Evan Simpson evan@zope.com
Mon, 25 Feb 2002 10:21:28 -0500


Sebastian Sippl wrote:
> I need to get the name of the current user , in a python script....

In a recent Zope, you should be able to use:

from AccessControl import getSecurityManager
user = getSecurityManager().getUser()

Cheers,

Evan @ Zope