That may be the problem, as I'm trying to do it in the _init_ . So what can I do to fix it? Igor
-----Jatorrizko mezua----- Nondik: Stefan H. Holek [mailto:stefan@epy.co.at] Bidalia: Ostirala, 2003.eko otsailak 21 13:00 Nora: Igor Leturia Cc: zope@zope.org Gaia: Re: ER: [Zope] Obtaining the name of the authenticated user fromwithina product's source code
[re-added zope@zope.org]
Please keep it on the list, Igor.
I guess we need more details on your code then. There is a known issue with authentication information not being available before the end of traversal.
See e.g. here <http://mail.zope.org/pipermail/zope-dev/2002-September/017596.html>
Stefan
--On Freitag, 21. Februar 2003 11:58 +0100 Igor Leturia <IGOR@emun.com> wrote:
You should not rely on AUTHENTICATED_USER.
From DTML use _.SecurityGetUser().getUserName() From your Python product use
from AccessControl import getSecurityManager
user = getSecurityManager().getUser() name = user.getUserName()
I've tried, but the name I obtain is 'Anonymous user', which is not true, there is a user authenticated. As I said, if I try REQUEST['AUTHENTICATED_USER'] in a DTMLMethod it is there, but not in the product's source code.
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/