mirror of
https://github.com/wekan/wekan.git
synced 2026-01-07 10:08:49 +01:00
Merge pull request #3329 from cloudron-io/ldap_sync_email
ldap: sync email address
This commit is contained in:
commit
cfe78471aa
1 changed files with 16 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue