Copied to clipboard

Flag this post as spam?

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


  • Jorge 37 posts 119 karma points
    Aug 26, 2023 @ 04:09
    Jorge
    0

    Check if member is logged-in in RoutingRequestNotification

    How to check if a member is logged in within this code?

    The _memberManager.IsLoggedIn(); always return false.

    I have this code works perfectly fine but I need to add a feature where it needs to check the member state.

    public class TestRequestNotification : INotificationHandler<RoutingRequestNotification>
        {
            private readonly IMemberManager _memberManager;
    
            public TestRequestNotification(IMemberManager memberManager)
            {
                _memberManager = memberManager;
    
            }
    
            public void Handle(RoutingRequestNotification notification)
            {
                var isLoggedIn = _memberManager.IsLoggedIn(); // always return false
    
            }
        }
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies