Esempio n. 1
0
        public async Task <JsonResult> ChangeProfilePassword(ChangeProfilePasswordVM model)
        {
            if (ModelState.IsValid)
            {
                var result = await _AppUserService.ChangeProfilePasswordAsync(model).ConfigureAwait(false);

                if (result.Stat)
                {
                    await GetBaseService().AddActivity(ActivityType.Update, model.UserID, model.BUserName, "Change Password", "Changed user password");

                    return(Json(new { stat = true, msg = "Successfully Changed user password" }));
                }
                else
                {
                    return(Json(new { stat = false, msg = result.StatusMsg }));
                }
            }
            else
            {
                return(Json(new { stat = false, msg = "Invalid User change password data" }));
            }
        }