Skip to content

Commit

Permalink
Merge user custom fields on LDAP sync
Browse files Browse the repository at this point in the history
Fix #15374
Merge current custom fields with new ones from LDAP.
  • Loading branch information
tobiasge committed Apr 21, 2020
1 parent 5a1ef96 commit 6701426
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/ldap/server/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ export function syncUserData(user, ldapUser, ldap) {
_setRealName(user._id, userData.name);
delete userData.name;
}
userData.customFields = {
...user.customFields, ...userData.customFields,
};
Meteor.users.update(user._id, { $set: userData });
user = Meteor.users.findOne({ _id: user._id });
}
Expand Down

0 comments on commit 6701426

Please sign in to comment.