1 Reply Latest reply on Jan 12, 2007 12:02 PM by c_wigginton

    Passing a session variable to the next Application.cfm

    Level 7
      I have installed CanvasWiki on our law school web site. In the main login
      section of our site, it's creates a session that holds the student's id
      which is used to authorize users for different sections.When I try to move
      to the Wiki, it forgets the Session varible (doesn't pass it).
      How can I maintain it to the next application.cfm / section?

      Login page:
      <cfquery name="info" datasource="***">
      select people_code_id
      from users
      where Username = '#getAuthUser()#'
      </cfquery>
      <cfset SESSION.Authorization.pfcode = people_code_id>

      CanvasWiki application.cfm
      <cfsilent><cfapplication name="CanvasWiki" sessionmanagement="true"
      loginstorage="session" sessiontimeout="#createtimespan(0,1,0,0)#"/>
      <cfsetting showdebugoutput="false"></cfsilent>

      Any ideas?


        • 1. Re: Passing a session variable to the next Application.cfm
          c_wigginton Level 1
          ColdFusion searches up the tree for the Application.cfm

          You may not need the Application.cfm in a sub tree. If there is application related code that must be executed in a subtree, include the previous application.cfm page and then add any specific subtree application.cfm code

          Application.cfm
          <~--- application tag and auth/login code here --->

          subtree/Application.cfm
          <cfinclude template="../Application.cfm">
          <!--- additional application code --->
          <cfif GetAuthUser() eq "" or Not IsUserInRole("Admin")>
          <cfoutput>Access Denied</cfoutput>
          <cfabort>
          </cfif>