Thanks all

-- 
Scott Stewart
ColdFusion Developer
 
SSTWebworks
4405 Oakshyre Way
Raleigh, NC. 27616
(919) 874-6229 (home)
(703) 220-2835 (cell)

-----Original Message-----
From: Tom McNeer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:17 PM
To: CF-Talk
Subject: Re: onRequestStart()

As Greg says, yes, you can certainly check for the variables in
onRequestStart().

In onSessionStart() (which will fire before onRequestStart), do something
like:

<cfset session.loggedIn = false />

Then the variable should always exist (although it would still be good
practice to test for its existence, as you did in your sample code.

In onRequestStart(), you could then do:

<cfif isDefined("session.loggedIn")>
     <cfif NOT session.loggedIn>
           <cflocation url="../admin/login.cfm">
     </cfif>
<cfelse>
      <cflocation url="../admin/login.cfm">
</cfif>


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:301663
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to