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); }
public JsonResult EmailExists(string email) { var result = _accountUtil.GetUserByEmail(email) == null; return(Json(result, JsonRequestBehavior.AllowGet)); }