Problem with StructClear (Session) and Potential Fix

 
Jan 10, 2000
Due to changes to Session variables in ColdFusion 4.5, you can not use StructClear(Session) anymore to delete someone's session. This is covered in a new Knowledge Base article on the Allaire site.

A potential fix for this is to use the following code

<CFLOOP COLLECTION=#Session# ITEM="key">
<CFIF Not ListFindNoCase('CFID,CFTOKEN,SESSIONID,URLTOKEN', Key)>
<CFSET StructDelete(Session, Key)>
</CFIF>
</CFLOOP>

Privacy | FAQ | Site Map | About | Guidelines | Contact | Advertising | What is ColdFusion?
House of Fusion | ColdFusion Jobs | Blog of Fusion | AHP Hosting