Copied to clipboard

Flag this post as spam?

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


  • Mila Pandurska 75 posts 350 karma points
    Oct 17, 2019 @ 12:04
    Mila Pandurska
    0

    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:

     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);
                 }
             }
    
    1. 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.

    2. Implement forgotten password functionality - send an email with reset token and then redirect to reset password page.

    Any documentation/ideas will be helpfull

    Mila

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies