[opencms-dev] Logging out a Web User

Brian Jacobs brian at purplemonkey.com
Wed Oct 26 23:36:50 CEST 2005


Hi Jason,
 
Yes, that worked. Thank you very much.

-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]On Behalf Of Jason Trump
Sent: Wednesday, October 19, 2005 3:43 PM
To: The OpenCms mailing list
Subject: RE: [opencms-dev] Logging out a Web User



How about request.getSession().invalidate()?  You'll have to reauthenticate as Guest on the next request.

 


  _____  


From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Brian Jacobs
Sent: Wednesday, October 19, 2005 3:00 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Logging out a Web User

 

Hi all, 

Thanks in advance for any help you can give. 

I'm having trouble logging out a web user. 

Logging in: 
        cms.loginWebUser( username, password ); <-cms is a CmsObject 

Logging out (by logging back in as Guest): 
        cms.loginUser( "Guest","");                     <-cms is a CmsObject 

Determining who the user is: 
        String currentUser = cmsjsp.user( "name" );     <- cmsjsp is a CmsJspActionElement 

When I want to log out (by logging the user back in as Guest), the cmsjsp.user("name") code continues to return the old name of the web user, not Guest.

Until that point things work as expected. First visiting the site, the user method returns "Guest", after logging in it returns the name of the web user. Just after logging in again as Guest do things go wrong.

Is there a different way I should log out a web user? I didn't find out in the API. 

 

Regards, 
        Brian Jacobs 
        Purple Monkey Studios 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20051026/ba03fd7e/attachment.htm>


More information about the opencms-dev mailing list