Merge pull request #562 from SISheogorath/fix/LDAP
Fix LDAP problem about missing uidNumber
This commit is contained in:
commit
881e800fd8
1 changed files with 3 additions and 2 deletions
|
@ -23,9 +23,10 @@ passport.use(new LDAPStrategy({
|
|||
tlsOptions: config.ldap.tlsOptions || null
|
||||
}
|
||||
}, function (user, done) {
|
||||
var uuid = user.uidNumber || user.uid || user.sAMAccountName
|
||||
var profile = {
|
||||
id: 'LDAP-' + user.uidNumber,
|
||||
username: user.uid,
|
||||
id: 'LDAP-' + uuid,
|
||||
username: uuid,
|
||||
displayName: user.displayName,
|
||||
emails: user.mail ? [user.mail] : [],
|
||||
avatarUrl: null,
|
||||
|
|
Loading…
Reference in a new issue