0 Replies Latest reply on Jun 6, 2007 6:43 AM by j_mcwatters



      I'm using cflogin in an application and it doesn't work the way I expected it to.
      I'm trying to use isUserInRole("") in an <cfif> tag to replace button.

      <cfif isUserInRole("")>
      <ahref="link" >Sign In</a>
      <ahref="link" >Sign Out</a>

      I expected this to show "Sign In" if the user has not logged in, and "SignOut" if they have.
      What I get is "Sign In" after I have logged in using <cfloginuser>, setting a role. When I hit F5, I am still logged in but now, "Sign Out" is displayed.

      Okay, sorry to change speeds half way but I just reread what I wrote and started a little testing. What I found was that unless the <cflogin> is above it, isUserInRole() it will not be updated when the user is logged in.
      This would mean my login form would have to be above my menu?

      Is there a better approach to what I trying here?


      - J