> How to assign session values wuth an structure like this > inside an CFC: > security.cfc > > <cfcomponent> > <cffunction access="public" name="authentication" output="0"> > <!--- security authentication function ---> > <!--- username and password required ---> <cfargument > name="cfcLogin" type="string" required="1"/> <cfargument > name="cfcPassword" type="string" required="1"/> > > <cfquery name="getUserAuth" ...../> > > <CFSET Session.Auth=StructNew()> ...
If you set Session variables directly from within your CFC, they should be available within any page belonging to that user's session. That said, I have a couple of suggestions. You may want to loosen the coupling between your CFC and the applications that use it by having the CFC actually return a useful variable instead of having it directly write to the Session scope. Alternatively, you might want to use the CFLOGIN stuff that was introduced in CFMX. For a while, I didn't care too much for CFLOGIN, but it's growing on me, especially since you can tie it to the Session scope in CFMX 6.1. > <cfdump var="#Session#"> give an error.... Did you enable session variables within your Application.cfm using the CFAPPLICATION tag? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182644 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

