Fixes setting the reset flag when allowManuallyChangingPassword is disabled

This commit is contained in:
Shannon
2019-06-12 12:51:26 +10:00
parent 35645672ae
commit c5347a97ce

View File

@@ -131,9 +131,9 @@ 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
//anytime a user is changing a member's password without the oldPassword, 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;
passwordProp.value.reset = !passwordProp.value.oldPassword && passwordProp.config.allowManuallyChangingPassword;
memberResource.save($scope.content, $routeParams.create, fileManager.getFiles())
.then(function(data) {