At 12:35 PM 12/12/00 -0600, you wrote:
>At 10:02 AM 12/12/00 -0800, you wrote:
> >Hi,
> >
> >I am having the strangest problem with a session variable. I set it in my
> >application.cfm file and this is the code:
> >
> ><CFLOCK SCOPE="SESSION" TIMEOUT="30" TYPE="EXCLUSIVE">
> ><CFIF NOT IsDefined("session.UserID")>
> >  <CFSET session.UserID = #GetVar.UserID#>
> ></CFIF>
> ></CFLOCK>
> >
> >2 out of the 3 people where I work can use the website just fine. The 3rd
> >person has their session variable set but when I try and output it,
> >nothing shows up. I know the session variable has been set because if I do
> >a <cfif isDefined("session.userid")> 'Yes I exist' <cfelse>I don't
> >exist</cfif> It  gives me a 'Yes, I exist'. I even deleted it by using
> ><cfset structdelete("session.userid")> and ran the <cfif> statement again
> >and it said 'I don't exist'. When I do
> ><cfoutput>#session.Userid#</cfoutput> nothing shows up? My website is
> >dependent on the UserId to see certain pages so obviously it is not
> >working for this 3rd person in my group. I'm stumped. Help, please.
> >
>
>Try printing the session variable. If somehow the session variable were
>empty, it might still exist and this code would have these results if
>session.userid is "". Instead of printing "Yes I exist" print "User
>ID:"#session.userid#

After rereading your message I see that you may have already tried this. 
Sorta.

This is user tracking and it's probably hitting a database and querying for 
the logon id and password at the beginning. If there aren't any records 
returned but you don't check to see if there are records returned, and you 
set userid from the query set (which is empty), you will get this kind of 
problem. In other words, if you aren't testing for records to actually be 
returned by this query, instead of booting a bad login, you are allowing 
the person into the system with an empty userid. I'm not saying that this 
is necessarily what is happening, but it will cause the symptoms you 
mentioned. The user could be logging in incorrectly so no record is 
returned and this would be the effect.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to