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)
{
if (ModelState.IsValid)
{
var member = _memberService.CreateMember(model.UserName, model.Email, model.Name, "Member");
_memberService.Save(member);
_memberService.SavePassword(member, model.Password);
}
}
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.
Change Password, Reset password
Hi
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:
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
Mila
Hi Mila,
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.
Or this if you have the old password.
Here are the ChangePassworkModel Properties
Hope that helps anyone with a similar issue.
is working on a reply...