hi,
I've been trying to figure out this problem, but no luck. Whats happening
is
that i'm unable to get coldfusion to know the user is logged in. For
example,
session variables such mm_userauthorization, and mm_username are empty.
Second,
AuthUser and AuthPassword (cgi) are also empty. But, it does successfully
logs
in user to my system without giving errors. Here is the code:
<cfparam name="login_error" default="">
<!--- check if form was submited --->
<cfif isdefined ("submit")>
<!--- Run the query to check if user and pass match --->
<cfquery name="checkLogin" datasource="bbb">
SELECT *
FROM bbb.user_registration
WHERE email = '#form.email#' AND password = '#form.password#'
</cfquery>
<!--- If the query returns 1 result, that means the user exist --->
<cfif checklogin.RecordCount EQ "1">
<cflogin idletimeout="1800">
<cfloginuser
name="#form.email#"
password="#form.password#"
roles="User">
</cflogin>
<cfoutput>#GetAuthUser()#
<cfdump var='#cgi#'>
</cfoutput>
<cfabort>
<cflocation url="profile.cfm">
<cfelse>
<cfset login_error = "Sorry, the user does not exist. Please try
again.">
</cfif>
</cfif>
I know i'm doing something wrong.
Thanks for any help!


|