Well, if you are using session variables and a user logs in again, the
original session vars will be over written by your new ones.  If you want to
kill them on log out, you can kill the session struct like this:

Assuming your session variable is "session.username".

<cflock timeout=20 scope="Session" type="Exclusive">
   <cfset StructDelete(Session, "username")>
</cflock>

If you want to clear ALL session vars use "structClear(session)".

As far removing abandoned session vars the only thing you can do is set the
lifespan as low as you can without annoying users.



-----Original Message-----
From: Kevin Huff [mailto:[email protected]] 
Sent: Friday, October 02, 2009 2:45 PM
To: cf-newbie
Subject: messing with session vars


Hey guys and gals. I have a question. I'm working on some user management
stuff and I'm tracking all the users using session vars. I would like to log
a user out should they log in again before thier session expires or they
logOut. I need this because I have people logging in from many different
computers and ip's all day. So what I want to know is there some where I can
delete a session var that isn't the current user's? I hope this makes sense.
Thanks for the help. 

Kevin. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4830
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to