Hi, I'm having problems trying to get the onSessionEnd function to work in the Application.cfc file.
I can confirm that the sessions are being created and that they are also dropping after the specified time. However, no further action is taken when the session is ended. I've tested the code within the onsessionend function and that seems to work, it just doens't appear to be called? Here's the code: [code] <cfcomponent output="false"> <!--- Global Application Settings ---> <cfset setEncoding("url","utf-8")> <cfset setEncoding("form","utf-8")> <cfcontent type="text/html; charset=utf-8"> <cfset THIS.name = "PomAdminzone"> <cfset THIS.sessionManagement = true> <cfset THIS.sessiontimeout = createtimespan(0,0,0,20)> <cfset This.applicationtimeout= createtimespan(5,0,0,0)> <cffunction name="onRequestStart" output="true"> <!--- Global Site Settings ---> <cfset THIS.scriptProtect = "all"> <cfinclude template="../_company-info.cfm"> <cfinclude template="_login-check.cfm"> <cfset REQUEST.theDirection = 'ltr'> <cfset REQUEST.theLingo = 'en'> <cfset REQUEST.theLayout = 'layout-admin2.cfm'> <cfset REQUEST.theStyle = 'layout-admin2.css'> <cfset REQUEST.useContent = 'yes'> </cffunction> <cffunction name="onSessionStart"> <cfinclude template="../_company-info.cfm"> <cfset SESSION.created = now()> <cfquery name="changeStatus" datasource="#REQUEST.theDatabase#"> UPDATE companyDetails SET status = 'ONLINE' WHERE companyID = <cfqueryparam value="#REQUEST.companyID#" cfsqltype="cf_sql_integer" /> </cfquery> </cffunction> <cffunction name="onSessionEnd"> <cfinclude template="../../../customtags/getSessionList.cfm"> <cfif StructIsEmpty(getSessionList(application.applicationname))> <cfquery name="changeStatus" datasource="#REQUEST.theDatabase#"> UPDATE companyDetails SET status = 'INTERMITTANT' WHERE companyID = <cfqueryparam value="#REQUEST.companyID#" cfsqltype="cf_sql_integer" /> </cfquery> </cfif> </cffunction> </cfcomponent> [/code] Any ideas how to resolve this? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262849 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4