[Zope] what are the dtml for logout and deleting a existing user??

Dieter Maurer dieter at handshake.de
Wed May 11 14:32:33 EDT 2005


Allen Huang wrote at 2005-5-10 09:26 -0700:
>what are the dtml for logout of an account  and deleting a existing user??

When you are using "basic HTML authentication",
then logout is a browser operation (and not a server one).

You can use the following DTML Method to facilitate logout somehow

<dtml-var standard_html_header>
<h2><dtml-var title_or_id> <dtml-var document_title></h2>
<p>
<dtml-if "AUTHENTICATED_USER.getUserName() != 'Anonymous User'">
  <dtml-raise Unauthorized></dtml-raise>
</dtml-if>
You have been logged out.
</p>
<dtml-var standard_html_footer>

When you visit it, the browser login dialog appears.
When you enter wrong (!) login information, you get logged out.

As you see, not a very intuitive way (but the only one the
server can used without Javascript (and I do not know any Javascript
solution).


The deletion of a user is a "UserFolder" operation.
Look at the methods it provides (either look at the source
or use "DocFinder" or the "DocFinder Tab").


-- 
Dieter


More information about the Zope mailing list