Exemple #1
0
        public ActionResult IsActiveUser(string UserId)
        {
            UserId = (UserId.Replace("œ", "+").Replace("Ž", "=").Replace("ô", "/"));
            UserId = EncryptionDecryptionHelper.DecryptString(UserId);
            _logger.LogInformation("GET: api/User/IsActiveUser Invoke");
            ResponseModel responseModel = new ResponseModel();
            int           UserIdint     = Convert.ToInt32(UserId);
            var           result        = _userService.IsActiveUser(UserIdint);

            responseModel.Result = result;
            return(Ok(responseModel));
        }
Exemple #2
0
        public ActionResult GetUserByEncryptedId(string UserId)
        {
            string pswd   = (UserId.Replace("œ", "+").Replace("Ž", "=").Replace("ô", "/"));
            var    userId = Convert.ToInt32(EncryptionDecryptionHelper.DecryptString(pswd));

            _logger.LogInformation("GET: api/User/GetUserByEncryptedId Invoke");
            ResponseModel responseModel = new ResponseModel();
            var           result        = _userService.GetUserById(userId);

            if (result == null)
            {
                responseModel.IsSuccess = false;
                responseModel.Message   = "No Record Found";
            }
            else
            {
                responseModel.Result = result;
            }

            return(Ok(responseModel));
        }
Exemple #3
0
        public ActionResult Updatepassword(Forgotpassword forgotpassword)
        {
            string UserId = (forgotpassword.UserId.Replace("œ", "+").Replace("Ž", "=").Replace("ô", "/"));

            forgotpassword.UserId   = EncryptionDecryptionHelper.DecryptString(UserId);
            forgotpassword.Password = EncryptionDecryptionHelper.EncryptString(forgotpassword.Password);
            _logger.LogInformation("Post: api/MobileUser/Updatepassword Invoke");
            ResponseModel responseModel = new ResponseModel();
            var           result        = _userService.Updatepassword(forgotpassword);

            if (result <= 0)
            {
                responseModel.IsSuccess = false;
                responseModel.Message   = "Record Not Updated";
            }
            else
            {
                responseModel.Result = "Update";
            }
            return(Ok(responseModel));
        }
Exemple #4
0
        public ActionResult CheckUrlisExpireOrNot(string UserId, string GUID)
        {
            _logger.LogInformation("Post: api/User/UpdateUserIs Invoke");
            ResponseModel responseModel = new ResponseModel();

            UserId = (UserId.Replace("œ", "+").Replace("Ž", "=").Replace("ô", "/"));
            UserId = EncryptionDecryptionHelper.DecryptString(UserId);
            GUID   = (GUID.Replace("œ", "+").Replace("Ž", "=").Replace("ô", "/"));
            GUID   = EncryptionDecryptionHelper.DecryptString(GUID);
            int UserIdinInt = Convert.ToInt32(UserId);
            var result      = _userService.CheckUrlisExpireOrNot(UserIdinInt, GUID);

            if (result == null)
            {
                responseModel.IsSuccess = false;
                responseModel.Message   = "Record Not Updated";
            }
            else
            {
                responseModel.Message = result;
            }

            return(Ok(responseModel));
        }