Oh yes - you definitely want to update the datetimestamp on each hit. Not really a problem (aside from the fact that I didn't mention it).
~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: Taco Fleur [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 04 February, 2003 4:14 AM To: CF-Talk Subject: Re: CF Logins and Users Logged In Simon, I see one problem with the solution you mention. You would need to update the structure every time the user hits another page, otherwise every client would always be deemed logged out after X minutes with this method.. Tell me if I am wrong, I did have a few wines so could be way off here.... Taco Fleur ----- Original Message ----- From: "Simon Horwith" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 7:04 PM Subject: RE: CF Logins and Users Logged In > 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

