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 have Umbraco 8.2.0 project and I have user accounts (members) which needs to login and edit their details.
I cannot find how to:
1.What is the recommended way to create new member? I have the code bellow, but I am not sure that it is the right way in Umbraco 8:
private readonly IMemberService _memberService;
public MemberController(IMemberService memberService, IMembershipUserService a)
this._memberService = memberService;
public ActionResult RegisterMember(RegisterModel model)
var member = _memberService.CreateMember(model.UserName, model.Email, model.Name, "Member");
Change member password from account page. Here I cannot find ChangePassword method in IMemberService which takes the old password, verify it and save the new password.
Implement forgotten password functionality - send an email with reset token and then redirect to reset password page.
Any documentation/ideas will be helpfull
This is a really old post, but I'm actively attempt to close these old posts with no answer, since they have such good SEO ranking. It'll help others.
So from my understanding there are 2 things to consider here.
You have the:
Both seem to have methods for changing passwords. They can both be injected via the constructor.
Use this to set the password if you don't know or care about the old one.
var member = _memberService.GetById(_membershipHelper.GetCurrentMemberId());
Or this if you have the old password.
_membershipHelper.ChangePassword(username, new ChangingPasswordModel(), MembershipProvider);
Here are the ChangePassworkModel Properties
Hope that helps anyone with a similar issue.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted