Beispiel #1
0
        /// <summary>
        /// 读取用户邮箱
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public static string GetUserEmail(HttpContext context)
        {
            string email = string.Empty;

            if (UserLogin.IsLogin(context))
            {
                UserLogin userLogin = UserLogin.GetUserLogin(context.User.Identity as FormsIdentity, context.Items);
                if (userLogin != null)
                {
                    email = userLogin.Email;
                }
            }
            return(email);
        }
Beispiel #2
0
 /// <summary>
 /// 是否已经登录
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public static bool IsLogin(HttpContext context)
 {
     return(UserLogin.IsLogin(context.Request));
 }