Esempio n. 1
0
		public async Task<ActionResult> ResetPassword(UserResetPasswordViewModel input)
		{
			if(!ModelState.IsValid)
				return View(input);

			await mUserService.ResetUserPassword(input.Username, input.NewPassword, input.ResetToken, 
			                                     new ValidationErrorNotifierAdapter(ModelState));

			if(!ModelState.IsValid)
				return View(input);

			return RedirectToAction("ResetPasswordConfirmation");
		}
Esempio n. 2
0
		public ActionResult ResetPassword(string resetToken)
		{
			if(String.IsNullOrWhiteSpace(resetToken))
				return new HttpStatusCodeResult(HttpStatusCode.BadRequest);

			var viewModel = new UserResetPasswordViewModel { ResetToken = resetToken };
			return View(viewModel);
		}