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'