Hi Chuck I finally got the session variables to work. Thanks for the assist!
* JB * Chuck wrote: > JB, > > When I do this I set a session scoped variable in the onSessionStart > function in my Application.cfc. > > Like so... > > <cfscript> > Session.User = StructNew(); > Session.User.LoggedIn = false; > Session.User.IsAdmin = false; > </cfscript> > > Then when they log in, if they are an admin... > > <cfscript> > Session.User.LoggedIn = true; > Session.User.IsAdmin = true; > </cfscript> > > Then when they log out I do... > > <cfscript> > StructDelete(Session, "User"); > Session.User = StructNew(); > Session.User.LoggedIn = false; > Session.User.IsAdmin = false; > </cfscript> > > Then for Session Expires, I put this in the onSessionEnd function in the > Application.cfc. > > <cfscript> > Session.User = StructNew(); > Session.User.LoggedIn = false; > Session.User.IsAdmin = false; > </cfscript> > > For the conditional piece to only show to admins put a <cfif> around the > code that should only be ran if the user is an admin, like so... > > <cfif Session.User.IsAdmin> > <!--- Code for Admin Only ---> > </cfif> > > > HTH > > Chuck > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:4686 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
