protected override void OnActionExecuting(ActionExecutingContext filterContext) { var cronofyCookie = Request.Cookies.Get(CronofyHelper.CookieName); if (cronofyCookie == null) { filterContext.Result = new RedirectResult("/login"); } else if (!CronofyHelper.LoadUser(cronofyCookie.Value, false)) { Response.Cookies.Remove(CronofyHelper.CookieName); filterContext.Result = new RedirectResult("/login"); } base.OnActionExecuting(filterContext); }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { uidCookie = Request.Cookies.Get(CronofyHelper.EnterpriseConnectCookieName); if (uidCookie == null) { filterContext.Result = new RedirectResult("/login/enterpriseconnect"); } else if (!CronofyHelper.LoadUser(uidCookie.Value, true)) { Response.Cookies.Remove(CronofyHelper.EnterpriseConnectCookieName); filterContext.Result = new RedirectResult("/login/enterpriseconnect"); } base.OnActionExecuting(filterContext); }