Beispiel #1
0
 public static void Clear()
 {
     if (Session != null)
     {
         SessionUser = null;
     }
 }
Beispiel #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);
        }
Beispiel #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;
            }
        }