Merge pull request #760 from thegcat/fix/support_multiple_emails_in_ldap

Multiple emails from LDAP are already an Array
This commit is contained in:
Christoph (Sheogorath) Kern 2018-03-10 20:40:59 +01:00 committed by GitHub
commit 2698aa4b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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'