On 11.Mai 2005 - 20:32:33, Dieter Maurer wrote: > 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).
Right. > 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. That's not necessary, look at the ZMI, there is a logout option in the dropdown box. I never digged into "zmi_logout" (IIRC it has that name) but I think it is not accessible by _any_ Zope-User even not the Emergency User, so regardless of what you type in the Login-dialog you get logged out. The only problem I find is that you get presented a login dialog which always fails to login and this is a bit "weird" as "logout-action". Andreas -- Never be led astray onto the path of virtue. _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )