what about something a little easier, given that all times after the first
time will the SESSION.LoggedIn be true:

<cfparam name="SESSION.LoggedIn" default="false" type="boolean">
<cfif NOT SESSION.LoggedIn>
    <cfset SESSION.LoggedIn = 1>
    <!--- set stuff other stuff --->

</cfif>
the binary operation is surely faster than the IsDefined() function, yes? :)

the other comment that it has to be part of an application.cfm is right, or
at least an application.cfm equivalent (such as FuseBox's app_globals.cfm),
and obviously you have to have used the <CFAPPLICATION ...> tag to allow for
SESSION variables in the first place :)

you could also put any gross application <CFSET>'s within this loop too,
thereby only having to set them once. (most people just put the <CFSET>'s in
the application.cfm with no loop and so they get set and reset and reset
everytime a page is called. For a high volume site obviously this makes a
difference). Even in a non-high volume site it makes some difference. we had
a site where only 1 or 2 people were logged in at once and not a heck of a
lot of DB queries being done. In hitting the pages many times in a row, we
noticed a 3-4% increase in speed by wrapping the 20-25 <CFSET>'s inside such
a loop. Although not scientific, I daresay to guess at least that savings
would occur in a high-traffic site, perhaps substantially higher depending
on what you do (or in this case, don't do) outside the loop.



> You will never get out of that loop.
>
> First time in,
>
> <cfif NOT IsDefined("Session.LoggedIn")>
> <CFSET Session.LoggedIn=False>
> </cfif>
>
> this isnt defined, so you show login page then you submit to page to
autheticate, but the application.cfm is run before that page as well.
>
> What you could do is include your authentication in the app.cfm
>
> Check there if good they are in if not send back.
>


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to