Exemple #1
0
        public ActionResult Login(string email, string password)
        {
            var user = UserService.GetUser(email);

            if(user== null)
            {
                user = new User();
            }
            else
            {
                Session["UserName"] = user.Email;
                FormsAuthentication.SetAuthCookie(user.Email, false);

                return RedirectToAction("Index", "Home");
            }

            return View(user);
        }
Exemple #2
0
        public ActionResult Login()
        {
            var userModel = new User();

            return View(userModel);
        }