Ejemplo n.º 1
0
        public JsonResponse <UserMasterDTO> ValidatePasswordResetUrl(string id)
        {
            JsonResponse <UserMasterDTO> response = new JsonResponse <UserMasterDTO>();

            try
            {
                if (SecurityBusinessInstance.ValidateGUID(id))
                {
                    response.SingleResult = UserBusinessInstance.GetUserByGUID(id);
                    response.IsSuccess    = true;
                }
                else
                {
                    response.IsSuccess = false;
                    response.Message   = "Password reset link is expired or invalid. Try again later.";
                }

                response.StatusCode = "200";
            }
            catch (Exception ex)
            {
                response.SingleResult = null;
                response.StatusCode   = "500";
                response.IsSuccess    = false;
                response.Message      = ex.Message;
            }
            return(response);
        }
Ejemplo n.º 2
0
        public ActionResult ChangePassword()
        {
            string uniqueid = Request.QueryString["id"];

            if (SecurityBusinessInstance.ValidateGUID(uniqueid))
            {
                ViewBag.hdnUniqueID = uniqueid;
                ViewBag.ShowForm    = true;
            }
            else
            {
                ViewBag.ShowPopup = true;
                ViewBag.Message   = "Invalid or expired link , Please try again later.";
            }
            return(View());
        }