Here's an snippet of my onRequestStart, yeah you can check for session variables in there..
<cfif structkeyexists(session.user,"emplid") and structkeyexists(url,"group_id")> <cfset qGroups = application.userGateway.getGroupsForUser(emplid = session.user.emplid)/> <cfset lstGroups = ValueList(qGroups.group_id) /> <!--<cfdump var="#lstGroups#" />----> <cfif not listfind(lstGroups,url.group_id)> <cflocation url="index.cfm?action=home" addtoken="no"> </cfif> </cfif> On Thu, Mar 20, 2008 at 11:24 AM, Scott Stewart <[EMAIL PROTECTED]> wrote: > Hey all, > > > > I'm trying to include some code to check for the existence of a > session.variable (session.loggedin) > > Is this something that should be dropped into onRequestStart() in the > Application.cfc? > > > > Here's the code > > > > <cffunction name="onRequestStart"> > > <cfif IsDefined("session.loggedIn")> > > <cfswitch expression="#session.loggedin#"> > > <cfcase value="1"> > > </cfcase> > > <cfcase value="0"> > > <cflocation url="../admin/login.cfm"> > > </cfcase> > > </cfswitch> > > <cfelse> > > <cflocation url="../admin/login.cfm"> > > </cfif> > > </cffunction> > > > > Secondly, how should I handle the cflocations? > > > > > > -- > > Scott Stewart > > ColdFusion Developer > > > > SSTWebworks > > 4405 Oakshyre Way > > Raleigh, NC. 27616 > > (919) 874-6229 (home) > > (703) 220-2835 (cell) > > > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.519 / Virus Database: 269.21.7/1335 - Release Date: 3/19/2008 > 9:54 AM > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301653 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4