Make it possible to save a member without resetting the password

This commit is contained in:
Kenn Jacobsen
2019-07-07 11:36:26 +02:00
parent 5ada85df29
commit 80d7f1b2c9

View File

@@ -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;
}