[Zope] Is Zope syntax inconsistent ?

Phil Harris phil.harris@zope.co.uk
Fri, 10 Mar 2000 13:08:51 -0000


Richard,

The equality check on AUTHENTICATED_USER will always fail because your
comparing an object with a string.

You need soemthiong more like :

<dtml-if expr="AUTHENTICATED_USER.getUserName()=='zope'">

hth

Phil
phil.harris@zope.co.uk


----- Original Message -----
From: "Richard Moon" <richard@dcs.co.uk>
To: <zope@zope.org>
Sent: Friday, March 10, 2000 9:13 AM
Subject: [Zope] Is Zope syntax inconsistent ?


> I've hit the 'Zope Wall' again ! Can anyone explain why
>
> <dtml-if expr="AUTHENTICATED_USER=='zope'">
> ZOPE !
> <dtml-else>
> NOT ZOPE !
> </dtml-if>
> <dtml-var AUTHENTICATED_USER>
> <br>
>
> Displays
>
> NOT ZOPE ! zope
>
> While this
> <dtml-if expr="tune_id=='Reel'">
> REEL !
> <dtml-else>
> NOT REEL !
> </dtml-if>
> <dtml-var tune_id>
>
> Displays
>
> REEL ! reel
>
> Which is what I expected !
>
>
> Richard Moon
> richard@dcs.co.uk
>
>
> _______________________________________________
> 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 )
>