private UserLoginData GetUserLoginData(Users u) { UserLoginData uld = new UserLoginData { User = u, UserPages = new List<int>() }; foreach (PageUsers pu in u.PageUsers) { uld.UserPages.Add(pu.IDPage); } return uld; }
public static void SetUserAuthentication(UserLoginData uld) { HttpContext.Current.Session["user_authentication"] = uld; }