Esempio n. 1
0
 public static void Clear()
 {
     if (Session != null)
     {
         SessionUser = null;
     }
 }
Esempio n. 2
0
        public static void Set(ISession session, UserService userService, int userID)
        {
            Session = session;

            var user         = userService.GetUser(userID);
            var locations    = GetLocations(user.id);
            var profileImage = GetProfileImage(user.ProfileImageID);

            SessionUser = new SessionUser(user, locations, profileImage);
        }
Esempio n. 3
0
        public static void UpdateProfileImage(int userID, int profileImageID)
        {
            if (SessionUser.Details.id == userID)
            {
                var user = SessionUser;

                var profileImage = GetProfileImage(profileImageID);
                user.ProfileImage = profileImage;

                SessionUser = user;
            }
        }