Make it possible to save a member without resetting the password

This commit is contained in:
Kenn Jacobsen
2019-07-07 11:16:02 +02:00
parent fabacd1689
commit 1af43498d9

View File

@@ -139,7 +139,7 @@ function MemberEditController($scope, $routeParams, $location, appState, memberR
//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;
}