> oi CF-Talk,!!

>   I've got this on a few pages:

> <cfif not isDefined("Session.Auth.iUserID") or Session.Auth.iUserID eq "">
>         <cflocation url="../logout.cfm?reason=sessiontimeout"
>         addtoken="no">
> </cfif>

> would  that  still  "qualify"  for a lock? and if so would I just lock the
> whole
> <cfif> ?

Yes and yes... Personally I would try and make sure that your
session.auth.iUserID is always defined ( likely using a cfparam in an
exclusive session-scope cflock in the application.cfm or fbx_settings.cfm ),
so that this then becomes

<cflock type="readonly" scope="session" timeout="10">
        <cfif not len(session.auth.iUserID)>
                <cflocation url="...">
        </cfif>
</cflock>

Though mine may only be one of many opinions... I personally never like to
use

Isdefined("varname") or varname eq ""

as a logical expression ... it strikes me as being more work than necessary
and possibly ( if however unlikely ) less reliable ... If nothing else, you
might want to trim the variable before comparing it to "" ...

hth

Isaac Dealey
www.turnkey.to
954-776-0046
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to