Merge pull request #5799 from kjac/v7-fix-save-member

V7: Can't save members without resetting their password
This commit is contained in:
Claus
2019-07-08 09:28:46 +02:00
committed by GitHub
@@ -133,7 +133,7 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
//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' });
if (!passwordProp.value.reset) {
if (passwordProp && passwordProp.value && !passwordProp.value.reset) {
//so if the admin is not explicitly resetting the password, flag it for resetting if a new password is being entered
passwordProp.value.reset = !passwordProp.value.oldPassword && passwordProp.config.allowManuallyChangingPassword;
}