[Zope] Re: Obtaining the User's Name from a Python Script in Zope

Evan Simpson evan@4-am.com
Mon, 21 Jul 2003 12:22:23 -0500


Tom Nichols wrote:
> I have used the getUserName() function in page templates and passed that 
> name as a parameter to python scripts in Zope.  But, now I need to 
> independently verify the authenticated user from a script

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

Cheers,

Evan @ 4-am.com