This: <cfloginuser name="#FORM.email#" password="#FORM.pass#" roles="2"> <cflocation url="#FORM.ref#" addtoken="yes">
If you cflocation before a closing </cflogin> the user is never logged in. On 7/12/06, B V <[EMAIL PROTECTED]> wrote: > I don't know what's wrong...... My login code does't seem to be working... > can anyone help me out? Alll of a sudden it stops working, and I suspect > there was a problem from the beginning. - It's odd..... No errors, no wrong > uname/pwd messages. What is wrong? > Here it is: > <cflogin> > <cfif isDefined("FORM.email") and isDefined("FORM.pass") AND isDefined(' > FORM.ref')> > <cfset hashedPassword = #Hash(#FORM.pass#, "SHA")# > > <cfquery name="checkLogin" datasource="interech"> > SELECT * FROM authaccounts WHERE email = "#FORM.email#" AND password = > "#hashedPassword#" > </cfquery> > <cfif #checkLogin.recordCount# EQ 1> > <cfloginuser name="#FORM.email#" password="#FORM.pass#" roles="2"> > <cflocation url="#FORM.ref#" addtoken="yes"> > <cfelse> > <cfset error = true > > </cfif> > </cfif> > </cflogin> > <cfif isDefined('error') > > <strong> Email and password aren't right.</strong> > <br /> > </cfif> > <cfif isDefined('URL.msg')> > <cfquery datasource="interech" name="getMSG"> > SELECT msg FROM msg WHERE id = "#URL.msg#" > </cfquery> > <cfif #getMSG.RecordCount# EQ 1> > <cfoutput><strong>#getMSG.msg#</strong></cfoutput> > </cfif> > </cfif> > Thanks for your help and time > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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/cf_lists/message.cfm/forumid:4/messageid:246208 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4