[opencms-dev] How to logout?

Petr Hollay ph at ethikom.de
Wed Sep 25 12:28:50 CEST 2002


For invalidating session you can use:

HttpSession session = ((HttpServletRequest)
cms.getRequestContext().getRequest().getOriginalRequest()).getSession(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