[EMAIL PROTECTED] wrote at 2005-9-27 18:11 +0100:
>If i'm logged in as testuser and want to log in with a different user
>name, whats the right way of doing it?
>this is on zope 2.7

When you are using HTTP authentication, then logging out is difficult
(and nasty).

The following DTML method helps you to log out:

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

When you call it via an URL, you will get a login dialog.
Put in any name and a *WRONG* password.
When you finish the dialog, you should see "You have been logged out".
After that, you can login again in the normal way.

Note, that in case you use correct login information
(a right password), then the login dialog will come again...

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to