From 12dae4465f66966368ab75285c446f51db0ea4ab Mon Sep 17 00:00:00 2001 From: Felix Schäfer Date: Fri, 9 Mar 2018 14:37:03 +0100 Subject: Multiple emails from LDAP are already an Array Signed-off-by: Felix Schäfer --- lib/web/auth/ldap/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js index c6746473..1a5c9938 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' -- cgit v1.2.3