I have been using session variables to log people into my intranet site, but some users find it a nuisance to log in every time, and have suggested I set cookies. Hey, I'm flexible. When I try to set a cookie during the login process, they don't get created. What am I missing?
Here is my CFAPPLICATION:
I previously had SETCLIENTCOOKIES="YES", and it didn't work.
Now, for a clip from my login routine:
When I try to reference #Cookie.User.ID# later, it doesn't exist. It's something simple, I'm sure. Calista :-X
Jedi Knight,
Champion of the Force
Here is my CFAPPLICATION:
Code:
<CFAPPLICATION NAME="TLGD_Intranet"
CLIENTMANAGEMENT="Yes"
SESSIONMANAGEMENT="Yes">
Now, for a clip from my login routine:
Code:
<!--- If the user exists, set the flags --->
<CFLOCK TIMEOUT="10" THROWONTIMEOUT="Yes" TYPE="EXCLUSIVE" SCOPE="SESSION">
<CFIF QGETUSER.RECORDCOUNT EQ 1>
<CFSET SESSION.LOGIN = "true">
<CFSET SESSION.USER.ID = "#QGETUSER.PERSONID#">
<CFSET SESSION.USER.NAME = QGETUSER.PERSONFIRSTNAME&QGETUSER.PERSONLASTNAME>
<CFCOOKIE NAME="User.ID" VALUE="#QGETUSER.PERSONID#" EXPIRES="30">
<CFSET CALLER.CF_AUTHENTICATE = "success">
<!--- If there are too many or too few records, flag an error --->
<CFELSE>
<CFSET CALLER.CF_AUTHENTICATE = "failure">
</CFIF>
</CFLOCK>
Jedi Knight,
Champion of the Force