[Zope] comparing variables ??

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Tue, 14 Dec 1999 22:17:23 +1100


>>> "Geir B Hansen" wrote
> i try to compare two variables to check if they are equal, like this :
> 
>    <dtml-if expr="PARENTS[0].id == AUTHENTICATED_USER">
>    <h2>YES !!</h2>
>    <dtml-else>
>     <h2>NO</h2>
>    </dtml-if>

AUTHENTICATED_USER isn't actually a string - it's an object, which
has a string representation that _looks_ like a string.

AUTHENTICATED_USER.getUserName() is what you're looking for here.

Anthony