public ActionResult UpdateAll(string returnUrl)
        {
            FeedMachine.UpdateAll(User.Identity.Name);

            if (Url.IsLocalUrl(returnUrl))
            {
                return(Redirect(returnUrl));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
Exemple #2
0
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
            {
                // update all of the feeds for this user after each login.
                FeedMachine.UpdateAll(model.UserName);

                return(RedirectToLocal(returnUrl));
            }

            // If we got this far, something failed, redisplay form
            ModelState.AddModelError("", "The user name or password provided is incorrect.");
            return(View(model));
        }