Here is the isUserAuthenticated Function.

<cffunction name="isUserAuthenticated" output="false" returntype="boolean" 
hint="Checks to make sure a user has an active session.">
                
                <cflock scope="session" timeout="10" type="readonly">   
                <cfscript>
                        if(isDefined('Session.UserData')){
                                return 'true';
                        }else{
                                return 'false';
                        }
                </cfscript>             
                </cflock>               
        </cffunction>

Thanks for taking the time to look at this for me!



> Let's see your isUserAuthenticated function.
> 
> (Also, you don't need to use YesNoFormat... your function should just 
> return a type of boolean.)
> 
> > <cfscript>
     
> 
> > if(YesNoFormat(Application.Security.isUserAuthenticated()) EQ "No"
> > AND trim(attributes.fuseaction) EQ "personalinfo"){
 
> 
> > 
> > Application.utils.redirect("#trim(request.webroot)#/index.
> > cfm?fuseaction
> > =loginScreen&reason=Your session expired.");
     
> 
> > }else if(YesNoFormat(Application.Security.isUserAuthenticated()) EQ
> > "No"){
 
> 
> > 
> > Application.utils.redirect("#trim(request.webroot)#/index.
> > cfm?fuseaction
> > =loginScreen&reason=Your session expired. Check your email inbox 
> for
> > your pin so you can login and continue your assessment.");
     
> 
> > }
> > </cfscript> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250772
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