From 88528c1ac253555b058258127b62016b6ae2d590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20J=C3=B6st?= Date: Fri, 12 Jun 2020 10:38:25 +0200 Subject: [PATCH] fixes #2050 use first email address when retrieving multiple from LDAP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Jöst --- server/modules/authentication/ldap/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/authentication/ldap/authentication.js b/server/modules/authentication/ldap/authentication.js index 5c57bec692..173a02f753 100644 --- a/server/modules/authentication/ldap/authentication.js +++ b/server/modules/authentication/ldap/authentication.js @@ -38,7 +38,7 @@ module.exports = { const user = await WIKI.models.users.processProfile({ profile: { id: userId, - email: _.get(profile, conf.mappingEmail, ''), + email: String(_.get(profile, conf.mappingEmail, '')).split(',')[0], displayName: _.get(profile, conf.mappingDisplayName, '???'), picture: _.get(profile, conf.mappingPicture, '') },