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
I've got a custom surface controller to handle membership. I've got an update member action as follows:
public ActionResult MvcMemberUpdateForm(MvcMemberUpdateModel model)
var memberService = Services.MemberService;
var member = memberService.GetByEmail(model.Email);
TempData["Success"] = true;
I also want to let the member update their email address (which I also want to be the same as their username.) What is (are) the alias of these properties?
e.g. member.SetValue("email", model.Email);
Can the MemberService be used to achieve what I want it to?
I believe it's as simple as this:
member.Email = model.Email;
member.Username = model.Email;
I found a slight issue with updating the currently logged in member this way.
Generally, it does not work Umbraco Public access.
Further, methods like Umbraco.MembershipHelper.GetCurrentMember() return null.
I believe this is because the current member cookie has an email attached to it, but this is not updated when you update the member.
I recommend logging out the user after they have changed their username so that they can login again.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted