Its fairly straight forward, the problem is when they dont log out cleanly,
The simplist way is to have another column in your user table called
Logged_In and set it to 1 when logged on, and 0 on a clean logout
To find the count simply run the following script.
Select
count(Logged_in)
from
usersetup
where
logged_in=1
I think you might be able to use Jscript to get round the problem of a messy
application closure (ie closing the browser), but I'm not sure.
Jason Lees
Development Team Leader
National Express Coaches Ltd.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2003 08:49
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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4