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

Reply via email to