To update the on login DB I think the SQL is
update
usersetup
set
logged_in=1
where
Username = '#Session.Username#'
and on logout
update
usersetup
set
logged_in=0
where
Username = '#Session.Username#'
This assumes that you dont have users with the same username.
You may also want to investigate putting it into a stored procedure to
reduce the CF load, but have a chat with your DBA about it.
Jason Lees
Development Team Leader
National Express Coaches Ltd.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2003 09:30
To: CF-Talk
Subject: Re: CF Logins and Users Logged In
Hi
Thanks for the excellent replies
I have a log off feature which is a little piece of javascript
<SCRIPT LANGUAGE="JAVASCRIPT">
function confirmDelete(aURL) {
if (confirm("W A R N I N G ! Are you sure you wish to log off")){
document.location=aURL;
}
}
</SCRIPT>
<a href="javascript:confirmDelete('../logoff.cfm')">Log Out</a>
which sends the user to logoff.cfm. Contained in logoff.cfm is the following
CF Code
<cfapplication name="users" sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0,0,0,0)#">
Which ends their session.
Both ideas seem very usefull, just would like to implement the most
consistent and efficient method, so I would appreciate your views on the
best example to use?
Using Jasons example I would add another field to my Oracle usertable called
logged_in.
However how would I set that field when the user logs in????
Any code examples of how to achieve the above ??
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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