Barney Boisvert wrote:
> Add a two fields to your user table: isLoggedIn and lastAccessDate.

Or do it in an application structure and save yourself the db
overhead.  I use/maintain a 2d array to show a bunch of stuff as part
of a Who's On app.  When a user logs in their user ID is planted in
their who's on 'record', (which defaults to zero if they are not
logged in and just a visitor).

Then when anyone tries to log in the array is checked to see if they
are already logged in.  Steps are taken from there.  Those steps can
vary depending on your application (i.e. force the first user off the
system, deny the second user the login, kick them both off, alert the
sysadmin etc.)

You can find the Who's On code in the link below.  Just add a few
array elements to the code in the article to do what you need.

http://mysecretbase.com/How_To_Build_A_Who_Is_On_Application_With_ColdFusion.cfm

And when you're done you also get a Who's On app as a byproduct. Just
build something to loop over the array and display its contents.

<shameless plug>
I'm bringing out AccessMonger Pro in a couple of days and it does all
this stuff and gee whiz a whole lot more.
</plug>

--
--Matt Robertson--
President, Janitor
MSB Designs, Inc.
mysecretbase.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to