Avatar of pganeshan

asked on 

Problem with logging out the members

How can I check which members are currently logged in to the site ?
who they are ?
and If suppose aqnyone closes the browser window insted of loging out how can I force a system to log him out ?

Web Servers

Avatar of undefined
Last Comment
Avatar of dapperry

Are you using client or session vars?

:) dapperry
Avatar of paulkd

I don't have code - but if I were thinking of writing some to track logged-in users then Application.cfm is the place to start. Make sure that they cannot see any pages unless they are logged in. Depending on the server capabilities you could then update a database for every page access (use one table per user). If you log every page access, you don't need to worry when a logout (session vars timeout) occurs.

ColdFusion 4.5 also has special template which executes every time a page is exited - As well as not being able to remember what it's called I can't actually think of a use for it (yet).
It sounds like you don't have them logging in now?  Is this ture?

If you have them logging in already
1. What is the system for the user logging in?

If not

You would need to create one and then have a cookie set to expire or a session set to expire....
Avatar of dapperry

If you set CFID and CFTOKEN to "" then the session will disapate.  In addition you can set up a frameset with 1 frame.  On the frameset you use the onunLoad event.  From javascript you call the function on that event that loads a logout page, that sets CFID and CFTOKEN to "".  That way if someone types a new address into the browser's address bar, that the session will end right then and there, as well as ending when the browser is closed.

:) dapperry
Avatar of Dain_Anderson

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Web Servers
Web Servers

A web server refers to the software that helps to deliver web content that can be accessed either through the Internet or through an intranet. The primary function of a web server is to store, process and deliver web pages to clients. The communication between client and server takes place using the Hypertext Transfer Protocol (HTTP). The most common use of web servers is to host websites, but there are other uses such as gaming, data storage, running enterprise applications, handling email, FTP, etc.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo