Beispiel #1
0
        public ActionResult Register(User user, string confirmPassword)
        {
            if (isTrueUser(user, confirmPassword))
            {
                loginsDb.AddAccount(user);

                CreateAuthCookie(user);

                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                return(View());
            }
        }
Beispiel #2
0
        public ActionResult Register(User user, string confirmPassword)
        {
            if (isTrueUser(user, confirmPassword))
            {
                ILoginDao logins = LoginsTableConnection.Instance;
                logins.AddAccount(user);

                CreateAuthCookie(user);

                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                return(View());
            }
        }