public AdminBaseController(IConfiguration config, IUtilities utilities, IUserDbContext userDb) { HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies[config.BackendAccountCookie]; if (cookie != null) { string id = utilities.DecodeFromBase64(cookie.Value); this.LoggedUser = userDb.LoadUserById(Convert.ToInt32(id)); } }