[Zope] Checking for authenticated users...

Ixokai zope@myseraph.org
Mon, 2 Apr 2001 01:19:13 -0700


I'm in the process of working with Zope for the first time as a learning
exercise.. So far, I'm rather impressed with the immense potential of what I
can see myself doing without a great deal of difficulty.

The 'skeleton' index_html in / that provides a standard look for everything,
and so on, and so forth... Its just nice.

Now i'm working on my first form, and am having just a bit of trouble.
Perhaps its because I've never ended up using .real. HTTP authentication in
any other website I've done :)

I want the form to insert the person's username into the form if they have
logged in, otherwise, not enter anything and just print "Unregistered User"
on the webpage.

Here's what I'm trying, which simply isn't working :) It prints 'Anonymous
User' instead of 'Unregistered User' if my user isn't logging in.

<dtml-if expr="AUTHENTICATED_USER != 'Anonymous User'">
   <input type="text" name="From" value="&dtml-AUTHENTICATED_USER;"
size="36" maxlength="36">
  <dtml-else>
   Unregistered User
  </dtml-if>

What am I doing wrong?

Thanks for your help. :)

--Ix