public ActionResult LogIn(LogInViewModel model) { if (!ModelState.IsValid) { return View(model); } var loginResult = webSecurity.Login(model.Email, model.Password); unitOfWork.Save(); // save results of the attempted login if (!loginResult.Success) { ModelState.AddModelError("Login", loginResult.Message); return View(model); } var user = userService.GetUserByEmail(model.Email); if (user.NewEmail != null) { TempData.AddWarning("Your email address has not been confirmed. Please <a href=\"" + this.Url.Action("ResendEmailConfirmation", new { email = user.NewEmail }) + "\">confirm your email address.</a>"); } return RedirectToAction("Dashboard", "Members"); }
public ViewResult LogIn() { var model = new LogInViewModel(); return View(model); }