Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In Umbraco v8.1.5
Whatever i seem to try it doesn't work to find a Member's email address
I have created 2 MemberTypes "Owner" and "Student" each containing their respective fields, i am also using ModelsBuilder
i have a list with all the members the list contains IPublishedContent types or i just take the currentuser
var member = Umbraco.MembershipHelper.GetCurrentMember();
This retrieved member (when logged in) is of a ....DOMAIN.Models.Owner
In umbraco on the Members tab i can add a Login and an Email address but somehow i don't seem to be able to retrieve this in the backend.
i've tried several method's
var mail = member.Email;
but the property is not existing on the member type.
var mail = member.GetProperty("Email").Value<string>();
this is returning an empty string
var mailProperty = member.GetProperty("Email"); var mailText = mailProperty.Value<string>();
The property is found, but its value seems an empty string.
What is the proper way to retrieve the Member's core properties?
This is fixed since update v8.2.0
due to a bug in the backend before this version
problem description
I'd really like to have the Models Builder to include the email-property on the generated member class...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get Member email value
In Umbraco v8.1.5
Whatever i seem to try it doesn't work to find a Member's email address
I have created 2 MemberTypes "Owner" and "Student" each containing their respective fields, i am also using ModelsBuilder
i have a list with all the members the list contains IPublishedContent types or i just take the currentuser
This retrieved member (when logged in) is of a ....DOMAIN.Models.Owner
In umbraco on the Members tab i can add a Login and an Email address but somehow i don't seem to be able to retrieve this in the backend.
i've tried several method's
but the property is not existing on the member type.
this is returning an empty string
The property is found, but its value seems an empty string.
What is the proper way to retrieve the Member's core properties?
This is fixed since update v8.2.0
due to a bug in the backend before this version
problem description
I'd really like to have the Models Builder to include the email-property on the generated member class...
is working on a reply...