what you need to do is use the applcation scope to track all currently lodgged-in users. Unfortunatelly, I have too much on my slate right now to write a code example - but the short explanation is that everytime a user logs in, you need to add a key (that is a structure) to an application scope variable with the current datetimestamp as well as the cfid/cftoken for that user. The current # of logged in users is the # of keys. You should check to see if and datetimestamps are older than whatever you deem fit to flag a session as obviously over on each request and remove any keys that don't need to be there. That's the general idea. I'm sure someone else on this list will post a more code-centric explanation for you.
~Simon Simon Horwith Macromedia Certified Instructor Certified Advanced ColdFusion MX Developer Certified Flash MX Developer CFDJList - List Administrator Fig Leaf Software 1400 16th St NW, # 220 Washington DC 20036 202.797.6570 (direct line) http://www.figleaf.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 04 February, 2003 3:49 AM To: CF-Talk Subject: CF Logins and Users Logged In Hi Does anybody on the list know how I can implement a feature on my Intranet site thats shows how many users are currently logged. I.E. There are currently 5 users on the site. Any ideas on how to implement this ? This is what I have at the moment ...... The user enters their username/password to log into the Intranet - this checks against the database below <CFQUERY DATASOURCE="#Application.DSN#" NAME="entry"> SELECT * FROM usersetup WHERE Username = '#form.Username#' AND Password = '#form.Password#' </CFQUERY> If correct session variables are created and you enter the homepage. <CFSET Session.Password = "#Security.Password#"> <CFSET Session.Username = "#Security.username#"> <CFSET Session.forename = "#Security.foreName#"> <CFSET Session.surname = "#Security.surName#"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

