summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-03-10 20:40:59 +0100
committerGitHub2018-03-10 20:40:59 +0100
commit2698aa4b5f30f367d6465fc7fc95dff1010a456a (patch)
tree5de4c8c02f5e10b81ce76c59141c3f298e184129 /lib
parent21be5a55179f6541f61be9f95bbb69e3c7a6515b (diff)
parent12dae4465f66966368ab75285c446f51db0ea4ab (diff)
Merge pull request #760 from thegcat/fix/support_multiple_emails_in_ldap
Multiple emails from LDAP are already an Array
Diffstat (limited to '')
-rw-r--r--lib/web/auth/ldap/index.js2
1 files changed, 1 insertions, 1 deletions
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'