Copied to clipboard

Flag this post as spam?

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


  • Janusz Stabik 37 posts 59 karma points
    Jun 20, 2011 @ 23:07
    Janusz Stabik
    0

    LoginName control and IsLoggedOn issues

    I have a problem with the IsLoggedOn extension method in umbraco.library.

    In certain circumstances (namely the first visit to the site after restarting the browser) the Isloggedon method will return true however the ASP LoginName control will not return the login name.  A browser refresh will fix the issue and subsequent requests will show the correct LoginName value.  The issue is not immeditaly repeatable - i.e. if I close the browser and re-open it the issue will not occur.  Instead I have to leave the browser for a a number of minutes (seems to be associated with member / session timeout.

    We are using Umbraco 4.7

    A suitable workarund would be to expire the login after teh browser closes, however I have tried using  FormsAuthentication.RedirectFromLoginPage(Login1.UserName, false); in my login.Authenticate method to prevent a persistent cookie from being created, however the cookies are still created and the issue above will therafter occur.  A fix to either issue will be suitable - any ideas?

  • Janusz Stabik 37 posts 59 karma points
    Jun 20, 2011 @ 23:47
    Janusz Stabik
    0

    After further inspection the issue seems to be when the "yourAuthCookie" has expired but the UMB_MEMBER cookie has not.  The value in the yourAuthCookie seems to represent the value set in the formsauthentication timeout property. 


    Is there a workaround to this?

     

     
  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 21, 2011 @ 00:28
    Tom Fulton
    1

    Hi,

    This sounds like a recent bug that was introduced in 4.7 and is fixed for 4.7.1 (not yet released).  See this workitem in codeplex:  http://umbraco.codeplex.com/workitem/30171

    There is a workaround posted there, to run the following code for logging out:

    int memberID = Member.CurrentMemberId();
    Member.ClearMemberFromClient(memberID);

    FormsAuthentication.SignOut();
    Session.Abandon();

    or you could try using the latest nightly build from http://nightly.umbraco.org

    Hope this helps,
    Tom

Please Sign in or register to post replies

Write your reply to:

Draft