Skip to content

Commit 2698aa4

Browse files
authored
Merge pull request #760 from thegcat/fix/support_multiple_emails_in_ldap
Multiple emails from LDAP are already an Array
2 parents 21be5a5 + 12dae44 commit 2698aa4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/web/auth/ldap/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ passport.use(new LDAPStrategy({
3737
id: 'LDAP-' + uuid,
3838
username: username,
3939
displayName: user.displayName,
40-
emails: user.mail ? [user.mail] : [],
40+
emails: user.mail ? Array.isArray(user.mail) ? user.mail : [user.mail] : [],
4141
avatarUrl: null,
4242
profileUrl: null,
4343
provider: 'ldap'

0 commit comments

Comments
 (0)