Example #1
0
        public JsonResult IsUniqueUsername(string username, int?id)
        {
            if (_uniqueUsernameService.IsUniqueUsername(username, id))
            {
                return(Json(true, JsonRequestBehavior.AllowGet));
            }

            return(Json(_stringResourceProvider.GetValue("Commenting App - Username already registered.", "Username already registered."), JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public JsonResult IsUniqueUsername(string username, int?id)
        {
            if (_uniqueUsernameService.IsUniqueUsername(username, id))
            {
                return(Json(true, JsonRequestBehavior.AllowGet));
            }

            return(Json("Username already registered.", JsonRequestBehavior.AllowGet));
        }