I would suggest to check through your logic then as you likely have some conditional check that is stopping the variable from being set.
Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Dec 8, 2012 5:21 PM, "Thomas Eppler" <[email protected]> wrote: > > I switched all to Session.Loginname now, but keep getting the same > mysterious phenomenon over and over. > I give ColdFusion one more day, then I switch to Ruby for the rest of my > life. > > > > -------- Original-Nachricht -------- > > Datum: Sat, 8 Dec 2012 16:54:57 +0000 > > Von: Russ Michaels <[email protected]> > > An: cf-talk <[email protected]> > > Betreff: Re: Client.Loginname does not work for login form > > > > > I think it may be because you are dping a.cflocation, so the cookie is > not > > being set. > > I would suggest using session variable instead of client variables. > > > > Regards > > Russ Michaels > > www.michaels.me.uk > > www.cfmldeveloper.com - Free CFML hosting for developers > > www.cfsearch.com - CF search engine > > On Dec 8, 2012 4:19 PM, "Thomas Eppler" <[email protected]> wrote: > > > > > > > > Dear CF-Friends > > > I am standing in front of a mystery ... > > > I am using a variable Client.Loginname, which saves always the last > used > > > username, which I set in the username form field, so the user does not > > need > > > to type it again. But that variable seems not to accept the username > > after > > > a successful login. I test in that way: I use a wrong username, then a > > > correct username and password. After successfull login, I log out, and > > in > > > the form field I see the previously typed wrong username. I absolutely > > have > > > no explanation. > > > > > > Here are the details. > > > I use old fashioned Application.cfm with ColdFusion nine. > > > This contains in the beginnning: > > > > > > > > > <CFAPPLICATION NAME="myApp" > > > CLIENTMANAGEMENT="Yes" > > > clientstorage="Cookie" > > > setclientcookies="Yes" > > > SESSIONMANAGEMENT="Yes" > > > SESSIONTIMEOUT="#CreateTimeSpan(90,12,0,0)#" > > > APPLICATIONTIMEOUT="#CreateTimeSpan(300,12,0,0)#"> > > > > > > <CFPARAM NAME="Client.Loginname" DEFAULT=""> > > > <CFPARAM NAME="Session.LoggedIn" DEFAULT="NO"> > > > > > > > > > So if Session.LoggedIn is set to "NO" it redirects to login.cfm > > > Login.cfm contains the following: > > > > > > > > > <form name="einloggen" action="logincheck.cfm" method="post"> > > > > > > Please log in:<br> > > > Email: <input type="text" name="fusername" size="35" > > > value="<CFOUTPUT>#Client.Loginname#</CFOUTPUT>"><br> > > > Password: <input type="password" name="fpassword" size="16"><br> > > > <input type="submit" name="Log in" value="Login"> > > > > > > </form> > > > > > > > > > This leads to the logincheck.cfm file, which contains the following > > > relevant snippets: > > > > > > <CFSET Client.Loginname = "#trim(form.fusername)#"> > > > > > > <CFIF (fusername IS "#emailadresse#" and fpassword IS "#Xpasswort#" and > > > emailadresse is not "" and passwort is not "")> > > > <CFSET Session.LoggedIn ="YES"> > > > </CFIF> > > > > > > > > > <CFIF Session.LoggedIn IS "YES"> > > > <CFLOCATION URL="/index.cfm" ADDTOKEN="no"> > > > </CFIF> > > > > > > > > > > > > > > > > > > Any ideas why this code does not set the last defined Client.Loginname, > > > but takes the previous one for the username formfield in the login > > script? > > > > > > I slowly get more grey hairs .... > > > > > > > > > Thanks in advance > > > Thomas > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353401 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

