@if (User.Identity.IsAuthenticated)
{
var membershipHelper = new MembershipHelper(UmbracoContext.Current);
var member = membershipHelper.GetCurrentMemberProfileModel();
}
and so on ...
This is currently giving a nullref on @member.Name, as member is null. I was previously logged in.
Is this even the correct way to set up a login widget? (I think it is, actually). How do I handle when I get a null? I tried just logging the member out if that happens but that isn't enough as User.IsAuthenticated is still true.
Help would be appreciated, as this is preventing me working at all.
Nullref when using GetCurrentMemberProfileModel version 7.2.8
Hi,
I know that this is a known bug (U4-5928) but I want to a) Check that I am running into the same bug that is fixed by https://github.com/umbraco/Umbraco-CMS/commit/7316c5462a34bbeea50769b4149725e2c1fbd1b0 and b) Get someone to tell me how to access this fix.
My code is:
@using Umbraco.Web.Security;
and so on ...
This is currently giving a nullref on @member.Name, as member is null. I was previously logged in.
Is this even the correct way to set up a login widget? (I think it is, actually). How do I handle when I get a null? I tried just logging the member out if that happens but that isn't enough as User.IsAuthenticated is still true.
Help would be appreciated, as this is preventing me working at all.
Thanks
is working on a reply...