I find it strange I can't get member property in umbraco 11.1.0
What am I doing wrong? I can return all other things on the member like email and normal fields, but not any member properties.
var memberById = await _memberManager.FindByIdAsync("123");
var test = memberById.TryGetPropertyValue<int>("propertyalias", 0);
No matter what member property I try to get I get 0 as output.
also, if i try HasProperty I get false.?
var memberById = await _memberManager.FindByIdAsync("123");
IPublishedContent member = _memberManager.AsPublishedMember(memberById);
var test = member.GetValue<int>("propertyAlias");
Member properties
I find it strange I can't get member property in umbraco 11.1.0 What am I doing wrong? I can return all other things on the member like email and normal fields, but not any member properties.
No matter what member property I try to get I get 0 as output. also, if i try HasProperty I get false.?
Hi Thomas,
I think you now need to do this
Cool Huw, Thank you.
IPublishedContent member, solved my problem and I do this to get the property value:
is working on a reply...