FYI, if anyone wants to see an example of this on a live site, check out
http://www.cflib.org/temp.cfm. This session tracker is based on 2 CFCs I
wrote (one general purpose session tracker that is extended by a CFLib
specific one). Code is free for the taking (just send me a request).

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Simon Horwith [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, February 04, 2003 4:52 AM
> To: CF-Talk
> Subject: RE: CF Logins and Users Logged In
> 
> 
> on a successful login just do:
> <cfset application.loggedin[#session.cfid##session.cftoken#] 
> = structNew()> <CFSET 
> application.loggedin[#session.cfid##session.cftoken#].Password
>  = "#Security.Password#"> <CFSET 
> application.loggedin[#session.cfid##session.cftoken#].Username
>  = "#Security.username#"> <CFSET 
> application.loggedin[#session.cfid##session.cftoken#].forename
>  = "#Security.foreName#"> <CFSET 
> application.loggedin[#session.cfid##session.cftoken#].surname 
> = "#Security.surName#"> <cfset 
> application.loggedin[#session.cfid##session.cftoken#].logintim
> e = now()>
> 
> that's IF you have a reason to persist all that in the 
> application scope. you should be able to leave all of your 
> session scope code the way it is now (assuming it's working 
> now) and simply do a <cfset 
> application.loggedin[#session.cfid##session.cftoken#] = 
> now()> when a user logs in.  All you'd then need to do is a 
> datediff() against each key on each request to kill the keys 
> you no longer need.
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to