Solved

Please help me figure out a logout technique

Posted on 2004-08-12
2
149 Views
Last Modified: 2013-12-24
Hello,

I have a link in my navigation that says "Logout".  This navigation bar is included in my Application.cfm.

I want to the user to click the LOGOUT link in my navigation bar in order to get out of my application.

Please I am requesting if can someone give me a code and please mention where i have to put it, Application.cfm or other pages.  Im just in a tight schedule again.

Thanks for understanding.  By the way, i use the basic session method in Ben forta's book.  So, those CFlogout is a bit different from what i am doing.

Thanks
0
Comment
Question by:mdbbound
2 Comments
 
LVL 11

Accepted Solution

by:
hart earned 400 total points
ID: 11791300
ok thats simple....

just an advice don't put a lot of code in your application file as this file gets executed everytime...
keep it as simple as possible...

ok when the link is clicked.. call a file say LogOut.cfm
and in this file write this code

<!--- in the place of somevariable put a session variables name that u have formes after login --->
<CFIF IsDefined("Session.SomeVariable")>
    <cfset StructDelete(session,"SomeVariable")>
</CFIF>

Delete all the session variables and then redierect him to the login page

Regards
Hart
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 100 total points
ID: 11794687
Or struct delete / struct clear and then on that same page have a message that says "You are logged out. Click here to relogin"

rahter than auto- redirecting to login page.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now