//public static AuthoringUser GlobalData { get; set; } public static AuthoringUser getGlobalUser() { AuthoringUser globaluser = new AuthoringUser(); HttpCookie authCookie = System.Web.HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName]; if (IsValidAuthCookie(authCookie)) { var formsAuthentication = DependencyResolver.Current.GetService<FormsAuthenticationFactory>(); var ticket = FormsAuthentication.Decrypt(authCookie.Value); globaluser = new AuthoringUser(ticket); } return globaluser; }
//public static AuthoringUser GlobalData { get; set; } public static AuthoringUser getGlobalUser() { AuthoringUser globaluser = new AuthoringUser(); HttpCookie authCookie = System.Web.HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName]; if (IsValidAuthCookie(authCookie)) { var formsAuthentication = DependencyResolver.Current.GetService <FormsAuthenticationFactory>(); var ticket = FormsAuthentication.Decrypt(authCookie.Value); globaluser = new AuthoringUser(ticket); } return(globaluser); }