1 Reply Latest reply on Jul 7, 2006 4:36 PM by ghartong

    Can't shake a session with MM_logout

    Level 7
      I am using the stock DW / CF Logout. When the user logs out, it should
      return them to the homepage and destroy the session so they would have to
      login again to be able to view their account, etc.

      However, when I click the logout link, it doesnt do anything. The session
      must still be active because it still pulls thier username and name in the
      greeting.

      What am I missing?

      <cfif IsDefined("URL.MM_logout") AND URL.MM_logout EQ "1">
      <cflock scope="Session" type="Exclusive" timeout="30" throwontimeout="no">
      <cfset Session.MM_Username="">
      <cfset Session.MM_UserAuthorization="">
      </cflock>
      <cfset MM_logoutRedirectPage="index.cfm">
      <cfif MM_logoutRedirectPage EQ "">
      <cfset MM_logoutRedirectPage=CGI.SCRIPT_NAME>
      </cfif>
      <cfset
      MM_logoutQuery=ListDeleteAt(CGI.QUERY_STRING,ListContainsNoCase(CGI.QUERY_STRING,"MM_logo ut=","&"),"&")>
      <cfif MM_logoutQuery NEQ "">
      <cfif Find("?",MM_logoutRedirectPage) EQ 0>
      <cfset MM_logoutRedirectPage=MM_logoutRedirectPage & "?" &
      MM_logoutQuery>
      <cfelse>
      <cfset MM_logoutRedirectPage=MM_logoutRedirectPage & "&" &
      MM_logoutQuery>
      </cfif>
      </cfif>
      <cflocation url="#MM_logoutRedirectPage#" addtoken="no">
      </cfif>
      <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>

      --
      Wally Kolcz
      Developer / Support