You can check the username of AUTHENTICATED_USER as in <dtml-if "AUTHENTICATED_USER.getUserName()=='Anonymous User'"> (To all the people who complained about me using _.str(...)) or you might want to check the role as in <dtml-if "AUTHENTICATED_USER.has_role('Anonymous User')">. ----- Original Message ----- From: "Dennis Nichols" <nichols@tradingconnections.com> To: <zope@zope.org> Sent: Saturday, October 07, 2000 3:40 PM Subject: [Zope] AUTHENTICATED_USER (or something) making me crazy
If I inspect REQUEST by inserting a <dtml-var REQUEST> in my dtml I can see that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the following code, it never displays Guest. It takes the else branch and then, perversely, displays Anonymous User. Please point out my stupid mistake.
<dtml-if "AUTHENTICATED_USER=='Anonymous User'"> Guest <dtml-else> <dtml-var AUTHENTICATED_USER> </dtml-if>
Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python 1.5.2, RH 6.2
-- Dennis Nichols nichols@tradingconnections.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )