Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logout problem. Need help!!

Status
Not open for further replies.

Haishan

IS-IT--Management
Jan 26, 2005
3
0
0
GB
I have a problem of logout by using "logout user" from User Authentication Server Behavior. The user's information still store in teh website even click on the 'logout' Link.

Is there anyone can help me, please?

I have a Application.cfm and it's code:

<cfapplication sessionmanagement="yes" loginStorage="session" sessionTimeout="#CreateTimeSpan(0, 0, 1, 0)#">

<cfif IsDefined("Form.logout")>
<cflogout>
</cfif>

I use Restrict Access To Page Server Behavior to login user.
 
<cflogout> only works if you're using <cflogin>. If you're not using <cflogin>, you can use this to clear all session variables and log out your user.
Code:
<cfscript>
   StructClear(Session);
</cfscript>


Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
or if you only want to kill specific session variables:
Code:
<cflock timeout=20 scope="Session" type="Exclusive">
  <cfset StructDelete(Session, "yourvariablename")>
</cflock>
 
Thanks guys!!

But it still not working. I am using MX. They are the build-in code for log in user and log out behavior. It seems like th ewebsite store the login information until time out.

HELP!!!!

 
Hello, I just found the solution. It work perfectly to logout. :)

Just add this code in Application.cfm

<CFIF ISDEFINED("Cookie.CFID") AND ISDEFINED("Cookie.CFToken")>
<CFCOOKIE NAME="CFID" VALUE="#Cookie.CFID#">
<CFCOOKIE NAME="CFToken" VALUE="#Cookie.CFToken#">
</CFIF>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top