Esempio n. 1
0
        public async Task <ActionResult> SetPassword(SetPasswordViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            if (await _userRegistration.SetPassword(User.Identity.Name, model.NewPassword))
            {
                await _userRegistration.SignInBy(User.Identity.Name);

                return(RedirectToAction("Index", new { Message = ManageMessageId.SetPasswordSuccess }));
            }
            return(View(model));
        }