mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 21:28:49 +01:00
ldap: sync email address
This commit is contained in:
parent
a74bc81ff8
commit
e79e0cfb66
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) {
|
export function addLdapUser(ldapUser, username, password) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue