This has been in place for several months now with no problems. Until today!
One of our users now logs in and she is authenticated fine. But when she
clicks on any link automatically times her out and she is booted back to the
login page. This happens from any pc she is using -- including MINE! When I
login with my own username and password (or anyone else's that I've tried)
the system works great. Just as it always has. My question is... what could
POSSIBLY be causing this?!
I have attached a sample of my cflogin code. Any help/advice would be hugely
appreciated!
<CFSET LOGINPATH = "login.cfm">
<!--- START LOGIN --->
<!---SET ALLOWED ROLES -CASE SENSITIVE--->
<cfset AllowedRole = "#attributes.role#">
<cflogin idletimeout="3600" applicationtoken="public">
<cfif isdefined("form.password") and isdefined("form.username")>
<!--- TRY TO AUTHENTICATE USER --->
<cfinvoke
component = "NTSecurity"
method = "authenticateAndGetGroups"
domain = "#theDomain#"
userid = "#form.username#"
passwd = "#form.password#"
returnVariable = "Auth">
<!--- LOGIN USER --->
<cfif #Auth# IS "True">
<!--- AUTHENTICATION SUCCESS --->
<cfquery name="emp" datasource="intranet" dbtype="ODBC">
SELECT *
FROM EMPLOYEE_TABLE
WHERE (username = '#form.username#') and status <> '0'
</cfquery>
<cfif emp.recordcount IS "1">
<!--- SET ALL SESSION VARIABLES ---->
<cfset session.empid = emp.row_ID>
<cfloginuser name="#form.username#"
password="#form.password#" roles="#emp.roles#">
<CFELSE>
<!--- AUTHENTICATION SUCCEEDED BUT PROBLEM FINDING USERNAME
IN DB --->
<cflocation url="" addtoken="yes">
</cfif>
<CFELSE>
<!--- AUTHENTICATION FAILED --->
<cflocation url="" addtoken="yes">
</CFIF>
<cfelse>
<!--- USER IS NOT AUTHENTICATED AND DID NOT COME FROM A LOGIN PAGE (FORM
LOGIN VARIABLES DON"T EXIST), SO SEND TO LOGIN PAGE
This also occurs when user times out--->
<cflogout>
<cflocation url="" addtoken="no">
</CFIF>
</cfif>
</cflogin>
<!--- END LOGIN PROCEDURE --->
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

