ensures that the reset flag is passed to the server when an admin is changing a members password

This commit is contained in:
Shannon
2019-05-10 01:48:11 +10:00
parent d69a978870
commit f952877d04
3 changed files with 5 additions and 21 deletions

View File

@@ -131,6 +131,10 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
$scope.busy = true;
$scope.page.saveButtonState = "busy";
//anytime a user is changing a member's password, we are in effect resetting it so we need to set that flag here
var passwordProp = _.find(contentEditingHelper.getAllProps($scope.content), function (e) { return e.alias === '_umb_password' });
passwordProp.value.reset = true;
memberResource.save($scope.content, $routeParams.create, fileManager.getFiles())
.then(function(data) {

View File

@@ -251,13 +251,12 @@
</umb-button>
</div>
<div>
<umb-button type="button" ng-if="model.user.userDisplayState.key !== 'Invited'"
<umb-button type="button" ng-if="model.user.userDisplayState.key !== 'Invited' && model.changePasswordModel.isChanging === false"
button-style="[info,block]"
action="model.toggleChangePassword()"
label="Change password"
label-key="general_changePassword"
state="changePasswordButtonState"
ng-if="model.changePasswordModel.isChanging === false"
size="s">
</umb-button>
</div>