[Zope] Display logged-in username

Martin Bernhardt mail@bernihard.de
Mon, 20 May 2002 10:00:10 +0200


Hello,

I'm running into problems trying to display the name of a user who has
logged in. I use a frameset and in the top frame I want the username to be
displayed. Therefore I use

<dtml-var "AUTHENTICATED_USER.getUserName()">

which works fine as long as I'm inside the Zope management interface. It
also works fine if I let only authenticated users view the frame page by
granting VIEW and ACCESS CONTENTS INFORMATION rights to them only (and NOT
the Anonymous User). However, as soon as I let Anonymous Users view the
frame page (simply acquiring all permission settings), I get 'Anonymous
User' from the above <dtml-var ...> statement whether I'm already logged in
or not (I let users log in by letting them change their password on two
protected sites).

Is there a way to display the username on a non-protected site (which also
works outside the Zope Management Interface)? If not, how can I find out if
a user has already logged in or not?

Any help is greatly appreciated.

Martin