<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Logging out a Web User</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:Arial;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#606420;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:Arial;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink="#606420">
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;color:navy'>How about request.getSession().invalidate()? You’ll
have to reauthenticate as Guest on the next request.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face=Arial><span style='font-size:12.0pt'>
<hr size=3 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Brian Jacobs<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 19, 2005
3:00 PM<br>
<b><span style='font-weight:bold'>To:</span></b> opencms-dev@opencms.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [opencms-dev] Logging out
a Web User</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Hi all,</span></font>
<o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Thanks in advance for
any help you can give.</span></font> <o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>I'm having trouble
logging out a web user.</span></font> <o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Logging in:</span></font>
<br>
<font size=2><span style='font-size:
10.0pt'>cms.loginWebUser( username, password ); <-cms is a CmsObject</span></font>
<o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Logging out (by
logging back in as Guest):</span></font> <br>
<font size=2><span style='font-size:
10.0pt'>cms.loginUser( "Guest","");
<-cms is a CmsObject</span></font>
<o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Determining who the
user is:</span></font> <br>
<font size=2><span style='font-size:
10.0pt'>String currentUser = cmsjsp.user( "name"
); <- cmsjsp is a CmsJspActionElement</span></font> <o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>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.</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>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.</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Is there a different
way I should log out a web user? I didn't find out in the API.</span></font> <o:p></o:p></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt'>Regards,</span></font>
<br>
<font size=2><span style='font-size:
10.0pt'>Brian Jacobs</span></font> <br>
<font size=2><span style='font-size:
10.0pt'>Purple Monkey Studios</span></font> <o:p></o:p></p>
</div>
</div>
</body>
</html>