I have a controller function with odd behavior.

Calling this function sets the session variable and passes the
loggedIn result back to the event handler:

<cffunction name="authenticate" access="public" returnType="void"
output="false">
    <cfargument name="event" type="any">
    <!--- some logic here --->
    <cfset session.loggedIn = true />
    <cfset arguments.event.addResult("loggedIn") />
</cffunction>

However if I set the session variable after the addResult() call, the
session variable never gets set:

<cffunction name="authenticate" access="public" returnType="void"
output="false">
    <cfargument name="event" type="any">
    <!--- some logic here --->
    <cfset arguments.event.addResult("loggedIn") />
     <cfset session.loggedIn = true /> <!--- session var doesn't get
set --->
</cffunction>

Is this the expected behavior? If a result is being passed back to the
handler should it always be the last item in the controller function?

Thanks,
Steve

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to