Re: [Zope] Get current username within pythonscript
29 Jan
2003
29 Jan
'03
9:24 a.m.
from AccessControl import getSecurityManager return getSecurityManager().getUser()
how about:
# Returns the name of the current authenticated user return(context.REQUEST.AUTHENTICATED_USER.getUserName())
REQUEST.AUTHENTICATED_USER works, but i remember that this is not as safe as the other method. getSecurityManager().getUser() is the preferred one. Met vriendelijke groeten, Hans de Wit Stichting Farmaceutische Kengetallen Postbus 30460 2500 GL DEN HAAG Tel. 070-3737448 Fax 070-3737445
8467
Age (days ago)
8467
Last active (days ago)
0 comments
1 participants
participants (1)
-
H.de.Wit@SFK.NL