You need to create the loggedin structure first. Two ways:

(using mx, we don't need no stinkin' locks code)
<cfif not isDefined("application.loggedIn")>
        <cfset application.loggedIn = structNew()>
</cfif>

or

<cfparam name="application.loggedIn" default="#structNew()#">


=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, February 04, 2003 3:50 PM
> To: CF-Talk
> Subject: Re: CF Logins and Users Logged In
> 
> 
> I tried what you suggested and am now getting another error 
> message - what 
> should application.loggedin be set to for my variables???
> 
> Error Occurred While Processing Request 
> 
> Error Diagnostic InformationAn error occurred while evaluating the 
> expression:  application.loggedin["#session.cfid# 
> #session.cftoken#"] = now()
> 
> 
> Error near line 38, column 28. Error resolving parameter 
> APPLICATION.LOGGEDIN 
> The application variable LOGGEDIN does not exist. The cause 
> of this error is 
> very likely one of the following things: 
> The name of the application variable has been misspelled. 
> The application variable has not yet been created. 
> The application variable has timed out. 
> 
> 
> This is my actual page 
> 
> 
> <CFQUERY DATASOURCE="#Application.DSN#" NAME="Security">
> SELECT *
> FROM admin
> WHERE Username = '#form.Username#' AND Password = 
> '#form.Password#' </CFQUERY>
> 
> 
> 
> 
> <!--- If username and password Do not match then send them to 
> login 2 which 
> tells them there attempt to login was unsucessful and asks 
> them to login 
> again --->
> 
> <CFIF Security.RecordCount IS 0>
> <CFLOCATION URL="login2.cfm" ADDTOKEN="No">
> 
> <!--- If validation is succesful then set the username, 
> password from the 
> preceding login form that matched the admin query and was 
> validated as 
> Session variable. Also set the user ID from the admin query 
> as a session id, 
> then send them staright to their administration page --->
> 
> <CFELSE>
>     
> <CFSET Session.Password = "#Security.Password#">
> <CFSET Session.Username = "#Security.username#">
> <CFSET Session.ID = "#Security.ID#">
> <CFSET Session.Fname = "#Security.FName#">
> <CFSET Session.Lname = "#Security.LName#">
> <CFSET Session.position = "#Security.position#">
> <CFSET Session.Division = "#Security.Division#">
> 
> <CFSET application.loggedin["#session.cfid# 
> #session.cftoken#"] = now()>
> 
> <CFLOCATION URL="/itintranet/home/homepage.cfm" ADDTOKEN="No"> </CFIF>
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to