Session.MM_UserAuthorization

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theborg72
    New Member
    • May 2010
    • 1

    Session.MM_UserAuthorization

    I am trying to go get this function to start. I have try create something that hide and show function on page with MM_UserAuthoriz ation. To make it I used EQ.

    When i close browser i get follow error:

    Invalid list index 0.
    In function ListDeleteAt(li st, index [, delimiters]), the value of index, 0, is not a valid as the first argument (this list has 0 elements). Valid indexes are in the range 1 through the number of elements in the list.

    If I reload page it doesn't work. So I get negative value in ListDeleteAt with is from the Structkeyexists . I am stuck to find out how to make this work.

    Code:
      <cfif Session.MM_UserAuthorization EQ 1>
        show funktion only fore user with level 1
      </cfif>
    
      <cfif not Session.MM_UserAuthorization EQ 1>
        hide funktion
      </cfif>
    Then a login and logout. I add structKeyExists to logout function to make session work (almost)

    Code:
    <cfif IsDefined("URL.MM_logout") AND URL.MM_logout EQ "1" or (NOT structKeyExists(SESSION,'MM_USERAUTHORIZATION'))>
    Last edited by Niheel; May 28 '10, 08:10 PM. Reason: spelling grammar, punctuation
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Where are you calling listdeleteat?

    Also, surely the brackets should be around
    Code:
    IsDefined("URL.MM_logout") AND URL.MM_logout EQ "1"
    ?

    PS. you can use cfelse rather than 2 cfifs in your 1st code snippet.

    Comment

    Working...