コード例 #1
0
        public static User GetUser(HttpContextBase httpContext, IAccountUtil accountUtil)
        {
            var authCookie = httpContext.Request.Cookies["__AUTH"];

            if (authCookie == null)
            {
                return(null);
            }
            var user = accountUtil.GetUserByEmail(authCookie.Value);

            return(user);
        }
コード例 #2
0
        public JsonResult EmailExists(string email)
        {
            var result = _accountUtil.GetUserByEmail(email) == null;

            return(Json(result, JsonRequestBehavior.AllowGet));
        }