Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeremy 14 posts 64 karma points
    May 20, 2015 @ 15:53
    Jeremy
    0

    Help understanding Members.IsLoggedIn

    I am using Umbraco 7.2.4.  

    I am trying to create a logout button (I know about loginStatus.cshtml, but I am trying to learn how this works).  In the controller I have the following code:

    FormsAuthentication.SignOut();
    if (Members.IsLoggedIn())
    {
    //do something
    }
    else
    {
    //do something else
    }

    the above code has a true value for Members.IsLoggedIn().  I would have thought the SignOut would set this to false.  What am I not understanding about Members.IsLoggedIn?

    if you look at the UmbLoginStatusController, FormsAuthentication.SignOut is used.

Please Sign in or register to post replies

Write your reply to:

Draft