[opencms-dev] How to logout?

Olli Aro olli_aro at yahoo.co.uk
Wed Sep 25 17:12:28 CEST 2002


Thanks Petr - that does exactly what I was after! :)

Cheers,

Olli

> -----Original Message-----
> From: owner-opencms-dev at www.opencms.org
> [mailto:owner-opencms-dev at www.opencms.org]On Behalf Of Petr Hollay
> Sent: 25 September 2002 11:29
> To: opencms-dev at www.opencms.org
> Subject: RE: [opencms-dev] How to logout?
>
>
> For invalidating session you can use:
>
> HttpSession session = ((HttpServletRequest)
> cms.getRequestContext().getRequest().getOriginalRequest()).getSess
> ion(false)
> ;
> if (session != null) {
> 	session.invalidate();
> }
>
>
> Regards
> Petr
>
>
> -----Original Message-----
> From: owner-opencms-dev at www.opencms.org
> [mailto:owner-opencms-dev at www.opencms.org]On Behalf Of Olli Aro
> Sent: Tuesday, September 24, 2002 5:10 PM
> To: opencms-dev at opencms.com
> Subject: [opencms-dev] How to logout?
>
>
> Hi everyone,
>
> I have found a method for logging user in (CmsObject.loginUser()), which
> works nicely with I_CmsSession. However, I have not found similar
> method to
> log the user out - does anyone know what is the opencms procedure
> for this?
>
> I have noticed that if I log another user in the older session gets
> overwritten - hence I tried to log the 'Guest' in, but that unfortunately
> does not overwrite the session and I still get the previous user object,
> when using CmsObject.getRequestContent().currentUser()... Should I somehow
> empty/destroy the I_CmsSession?
>
> Regards,
>
> Olli
>
>




More information about the opencms-dev mailing list