Skip to content

Commit f93a14e

Browse files
committed
Fix LDAP problem about missing uidNumber
Signed-off-by: Sheogorath <[email protected]>
1 parent d1d6d58 commit f93a14e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/web/auth/ldap/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ passport.use(new LDAPStrategy({
2323
tlsOptions: config.ldap.tlsOptions || null
2424
}
2525
}, function (user, done) {
26+
var uuid = user.uidNumber || user.uid || user.sAMAccountName
2627
var profile = {
27-
id: 'LDAP-' + user.uidNumber,
28-
username: user.uid,
28+
id: 'LDAP-' + uuid,
29+
username: uuid,
2930
displayName: user.displayName,
3031
emails: user.mail ? [user.mail] : [],
3132
avatarUrl: null,

0 commit comments

Comments
 (0)