[Zope] Is Zope syntax inconsistent ?

Jim Sanford jsanford@atinucleus.com
Fri, 10 Mar 2000 08:23:09 -0600


or 

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

----- Original Message ----- 
From: Phil Harris <phil.harris@zope.co.uk>
To: <zope@zope.org>; Richard Moon <richard@dcs.co.uk>
Sent: Friday, March 10, 2000 7:08 AM
Subject: Re: [Zope] Is Zope syntax inconsistent ?


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 )
>


_______________________________________________
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 )