when a user goes from a secured page to an unsecured page(public page)...i want coldfusion to kill all session variables and make the user login again. How do i do this?
my "LoginResults.cfm" code looks like this:
<cfquery datasource="Advice2000" Name="ValidateLogin">
SELECT LoginID, Password
FROM Users
WHERE LoginID='#form.LoginID#' and
Password='#form.password#'
</cfquery>
<CFIF ValidateLogin.RecordCount IS 0>
<script language="javascript">
<!--
window.alert("Your Username and(or) Password is
incorrect, Try Again!"
self.location = 'advicelogin.cfm';
//-->
</script>
<cfelse>
<cfset Session.Validate = "1">
<cfoutput>
<cflocation url="../secure/AdviceSiteMap.cfm?cfid=#cfid#&cftoken=#cftoken#" addtoken="yes">
</cfoutput>
</cfif>
-------------
my "application.cfm" code looks like this:
<cfapplication name="AdviceLetter"
sessionmanagement="Yes"
setclientcookies="no"
sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
applicationtimeout="#CreateTimeSpan(0,0,30,0)#">
<cfparam name="DSN" default="Advice2000">
<CFIF NOT IsDefined("Session.Validate">
<script language="javascript">
<!--
window.alert("You have not logged in! or Your session
has expired!"
self.location = '/test/advice/adviceletter/login/advicelogin.cfm';
//-->
</script>
</cfif>
[sig][/sig]
my "LoginResults.cfm" code looks like this:
<cfquery datasource="Advice2000" Name="ValidateLogin">
SELECT LoginID, Password
FROM Users
WHERE LoginID='#form.LoginID#' and
Password='#form.password#'
</cfquery>
<CFIF ValidateLogin.RecordCount IS 0>
<script language="javascript">
<!--
window.alert("Your Username and(or) Password is
incorrect, Try Again!"
self.location = 'advicelogin.cfm';
//-->
</script>
<cfelse>
<cfset Session.Validate = "1">
<cfoutput>
<cflocation url="../secure/AdviceSiteMap.cfm?cfid=#cfid#&cftoken=#cftoken#" addtoken="yes">
</cfoutput>
</cfif>
-------------
my "application.cfm" code looks like this:
<cfapplication name="AdviceLetter"
sessionmanagement="Yes"
setclientcookies="no"
sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
applicationtimeout="#CreateTimeSpan(0,0,30,0)#">
<cfparam name="DSN" default="Advice2000">
<CFIF NOT IsDefined("Session.Validate">
<script language="javascript">
<!--
window.alert("You have not logged in! or Your session
has expired!"
self.location = '/test/advice/adviceletter/login/advicelogin.cfm';
//-->
</script>
</cfif>
[sig][/sig]