public async Task <IActionResult> ForgotConfirmPost(ForgotConfirmModel model) { if (ModelState.IsValid) { var user = await _userManager.FindByEmailAsync(model.Email).ConfigureAwait(false); if (user.Status == null) { ModelState.AddModelError("Not Found", "User doesnt exists"); return(View(model)); } try { await user.ConfirmForgotPasswordAsync(model.VerificationCode, model.NewPassword); } catch (Exception exp) { ModelState.AddModelError("Failed", exp.Message); return(View(model)); } return(RedirectToAction("", "Home")); } return(View(model)); }
public async Task <IActionResult> ForgotConfirm(ForgotConfirmModel model) { return(View(model)); }