Copied to clipboard

Flag this post as spam?

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


  • André Lange 108 posts 410 karma points
    May 19, 2020 @ 12:47
    André Lange
    0

    Get Email of member

    Im not sure why it is so hard.. but i'm not able to get the email / username of a member in 8.6.1

    When i do this: membershipHelper.GetById(member.Id).GetProperty("Email")

    I get this: Umbraco.Web.PublishedCache.NuCache.Property

    And if i use Modelsbuilder member, on that i am not able to get email as well..

    The documentation is non existing on this as far as i can see...

  • André Lange 108 posts 410 karma points
    May 19, 2020 @ 13:29
    André Lange
    0

    Okey, so i can get email through memberservice... But as far as i understand thats a query directly to the database, whereas membershiphelper is cache.

    Is there no way to get the email/username other than directly in the database?

  • André Lange 108 posts 410 karma points
    May 19, 2020 @ 14:09
    André Lange
    100

    So ended up just having to say GetValue() after a getproperty.. that doesn't really make sense to me.. But it works..

                var memberEmail = membershipHelper.GetById(member.Id).GetProperty("Email").GetValue();
    
Please Sign in or register to post replies

Write your reply to:

Draft