Skip to content

Commit 12dae44

Browse files
committed
Multiple emails from LDAP are already an Array
Signed-off-by: Felix Schäfer <felix@thegcat.net>
1 parent 21be5a5 commit 12dae44

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)