I still canât get the <CFLOGOUT> tag to work. Below is the code for my
application.cfc file. Below that is the <CFLOGIN> code in the
ForceUserLogin.cfm file that is included in every file in the application. The
login works fine. The logout does not. Someone suggested that I just have the
logout process set the session username/authorization to "", but I donât know
what syntax to use to
do that. Please help. Thanks.
Application.cfc
<cfcomponent output="false">
<cfset this.name="MSFWGrantees">
<cfset this.sessionManagement=True>
<cfset this.loginstorage="Session">
<cfset this.sessiontimeout=createtimespan(0,8,0,0)>
<cffunction name="onRequestStart" returntype="boolean" output="true">
<cfset REQUEST.datasource="wdsc">
<!--- Check to see if the user is logged in, if not force them to now --->
<cfinclude template="ForceUserLogin.cfm">
<cfreturn true>
</cffunction>
</cfcomponent>
<CFLOGIN idletimeout="#CreateTimeSpan(0,0,20,0)#">
<cfif NOT (IsDefined("Form.username") AND IsDefined("Form.Password"))>
<cfinclude TEMPLATE="Grantee_Login2.cfm">
<cfabort>
<CFELSE>
<cfquery name = "GetUser" datasource="wdsc">
SELECT UserID, FirstName, Rights, Password
FROM MSFW_Passwords
WHERE UserName = '#FORM.UserName#'
AND Password = '#FORM.Password#'
</cfquery>
<cfif GetUser.REcordCount EQ 1>
<cfloginuser
name="#GetUser.UserID#, #GetUser.FirstName#"
password="#FORM.password#"
roles="#GetUser.Rights#">
<cfelse>
<strong>Sorry, that user name and password are not recognized. Please try
again.</strong>
<cfinclude template="Grantee_Login2.cfm">
<cfabort>
</CFIF>
</cfif>
</CFLOGIN>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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/groups/CF-Talk/message.cfm/messageid:249213
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4