Beispiel #1
0
        public ActionResult Login(LoginModel model)
        {
            if (!ModelState.IsValid)
                return View();

            var user = UserService.Authentificate(model.Email, model.Password);

            if (user == null)
                return RedirectToAction("Error", new { errorCase = ErrorCase.InvalidUserData });

            return RedirectToAction("Courses", "Study");
        }
Beispiel #2
0
 public void AddAuthCookieToResponse(LoginModel model)
 {
     FormsAuthentication.SetAuthCookie(model.Id.ToString(), model.RememberMe);
 }