ldap: sync email address

reviewable/pr3329/r1
Girish Ramakrishnan 5 years ago
parent a74bc81ff8
commit e79e0cfb66
  1. 16
      packages/wekan-ldap/server/sync.js

@ -247,6 +247,22 @@ export function syncUserData(user, ldapUser) {
}
}
if (LDAP.settings_get('LDAP_EMAIL_FIELD') !== '') {
const email = getLdapEmail(ldapUser);
log_debug('email=', email);
if (user && user._id && email !== '') {
log_info('Syncing user email:', email);
Meteor.users.update({
_id: user._id
}, {
$set: {
'emails.0.address': email,
}
});
}
}
}
export function addLdapUser(ldapUser, username, password) {

Loading…
Cancel
Save