Exemplo n.º 1
0
        /// <summary>
        /// Get the current user data from the cache.
        /// </summary>
        /// <returns>The user information for the cuurent session.</returns>
        public static UserInfo GetUserInfo()
        {
            if (UserOnlineController.CurrentUser == null)
            {
                throw new Exception("No current session data has been set.");
            }

            UserInfo userInfo = ((UserInfo)RuntimeCache.Get(UserOnlineController.CurrentUser.UniqueHashcode));

            return(userInfo);
        }