Copied to clipboard

Flag this post as spam?

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


  • Bartlomiej Barc 7 posts 106 karma points
    Mar 15, 2017 @ 12:04
    Bartlomiej Barc
    0

    Custom CustomerContext

    Hi,

    Three methods, i.e.

    (1) protected override bool GetIsCurrentlyLoggedIn() {}

    (2) protected override string GetMembershipProviderKey() {}

    (3) protected override string GetMembershipProviderUserName() {}

    are not triggered when I create an instance of CustomerContext, like:

    var customerContext = new CustomerContext(UmbracoContext);
    

    for the first time after web application startup. However, when I refresh a web page, and on every subsequent CustomerContext class instantiation elsewhere in the app everything works fine, and I get my custom Customer right:

    var currentCustomer = customerContext.CurrentCustomer;
    

    Without the three methods being called Current Customer remains anonymous.

    What would be possible reasons of such a behavior ?

    I work with Merchello 2.3.1 and Umbraco 7.5.4.

    Bartek

Please Sign in or register to post replies

Write your reply to:

Draft