From 12dae4465f66966368ab75285c446f51db0ea4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Fri, 9 Mar 2018 14:37:03 +0100 Subject: [PATCH] Multiple emails from LDAP are already an Array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Felix Schäfer --- lib/web/auth/ldap/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js index c6746473b..1a5c99389 100644 --- a/lib/web/auth/ldap/index.js +++ b/lib/web/auth/ldap/index.js @@ -37,7 +37,7 @@ passport.use(new LDAPStrategy({ id: 'LDAP-' + uuid, username: username, displayName: user.displayName, - emails: user.mail ? [user.mail] : [], + emails: user.mail ? Array.isArray(user.mail) ? user.mail : [user.mail] : [], avatarUrl: null, profileUrl: null, provider: 'ldap'