Пример #1
0
        /// <summary>
        /// Returns the currently logged in user!
        /// </summary>
        /// <returns></returns>
        public static IUserResult getUser()
        {
            IUserResult res = new IUserResult();

            if (HttpContext.Current.Session["User"] == null)
            {
                res.Exists = false;
                return(res);
            }

            IUserAccount user = HttpContext.Current.Session["User"] as IUserAccount;

            res.User   = user;
            res.Exists = true;
            return(res);
        }
Пример #2
0
        /// <summary>
        /// Returns the currently logged in user!
        /// </summary>
        /// <returns></returns>
        public static IUserResult getUser()
        {
            IUserResult res = new IUserResult();

            if (HttpContext.Current.Session["User"] == null) {
                res.Exists = false;
                return res;
            }

            IUserAccount user = HttpContext.Current.Session["User"] as IUserAccount;
            res.User = user;
            res.Exists = true;
            return res;
        }