2 Jan
2003
2 Jan
'03
1 p.m.
Low Kian Seong wrote:
Dear People,
I am coding a cmftype to be used together with Plone. My question is why can i get the user using :
self.REQUEST['AUTHENTICATED_USER'].getUserName()
but when i try :
AccessControl.SecurityManager.getUserName()
it gives me an error saying that type 'module' is uncallable ?
Any help or explanation is appreciated. Thank you.
You want to query a SecurityManager instance, not a reference to the module itself. from AccessControl import getSecurityManager securityManager = getSecurityManager() user = securityManager.getUser() userName = user.getUserName() -- Jim Washington