示例#1
0
 //[UserAuthenticationAttribute(Constants.AllRoles)]
 public IActionResult CreateNewPassword(ResetPasswordViewModel users)
 {
     try
     {
         authHandler.CreateNewPassword(users);
         Logout();
         ViewData["SuccessMessage"] = "Password changed successfully, kindly login with new password";
     }
     catch (UserNotCreatedException ex)
     {
         Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(AuthController), ex);
         ViewData["NotFoundMessage"] = ex.Message;
         ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
     }
     return(View("CreateNewPassword"));
 }