/// <summary> /// Verifies information provided by the user. If the information is correct, /// the user is redirected to the view for resetting password. If not, an error /// message is shown. /// </summary> /// <param name="user">The user to check</param> /// <returns>A view/redirect depending on the input</returns> public ActionResult CheckUser(UserVM user) { if (user.FirstName == null) { return(View(user)); } //Check FirstName, SurName and PhoneNR if (_userBLL.CheckPersonalia(user)) { return(RedirectToAction("ResetPassWord", user)); } else { return(RedirectToAction("ShowMessage", "Home", new { header = "Noe gikk feil", message = "Pass på at all personalien er korrekt og prøv igjen." })); } }