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 @ 13:38
    André Lange
    0

    Update member Email and username

    I get a member by memberservice:

    var member = memberService.GetById(memberId);
    

    Then i set the member with SetValue

    But i am unable to update either email og username..

    member.SetValue("_umb_email", model.Email);
    member.SetValue("_umb_login", model.Email);
    

    or

    member.SetValue("Email", model.Email);
    member.SetValue("Username", model.Email);
    

    Both fail, saying there was no property with that alias.

    So how am i supposed to update a member ?

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

    Seems you just have to do it like this:

    member.Email = model.Email;
    member.Username = model.Email;
    
Please Sign in or register to post replies

Write your reply to:

Draft