[Zope] Re: How do I logout using DTML

Josef Meile jmeile at hotmail.com
Thu May 12 04:49:25 EDT 2005


> How do I logout current user using DTML
> I used <dtml-call expr="acl_users.logout(REQUEST)"> but it didn't work 
> and zope gave me this.
>  
> 
> 
>     Site Error
> 
> An error was encountered while publishing this resource.
> 
> *Error Type: AttributeError*
> *Error Value: logout*
> 
> **
>  
> *What did I do wrong??*
You didn't specify which user folder you are using and if, for example,
you use it with CookieCrumbler or other pluggins. If you use
CookieCrumbler, then you can expire the authentication cookies like
this:

<dtml-call "REQUEST['RESPONSE'].expireCookie('__ac', path='/')">
<dtml-call "REQUEST['RESPONSE'].expireCookie('__ac', path='/')">

I think a redirect is also needed, but I'm not sure.

If you aren't using CookieCrumbler, then you can try the method
described here:
http://zdp.zope.org/projects/zfaq/faq/General#973291635

Regards,
Josef



More information about the Zope mailing list