mirror of https://github.com/status-im/codimd.git
Merge pull request #562 from SISheogorath/fix/LDAP
Fix LDAP problem about missing uidNumber
This commit is contained in:
commit
881e800fd8
|
@ -23,9 +23,10 @@ passport.use(new LDAPStrategy({
|
||||||
tlsOptions: config.ldap.tlsOptions || null
|
tlsOptions: config.ldap.tlsOptions || null
|
||||||
}
|
}
|
||||||
}, function (user, done) {
|
}, function (user, done) {
|
||||||
|
var uuid = user.uidNumber || user.uid || user.sAMAccountName
|
||||||
var profile = {
|
var profile = {
|
||||||
id: 'LDAP-' + user.uidNumber,
|
id: 'LDAP-' + uuid,
|
||||||
username: user.uid,
|
username: uuid,
|
||||||
displayName: user.displayName,
|
displayName: user.displayName,
|
||||||
emails: user.mail ? [user.mail] : [],
|
emails: user.mail ? [user.mail] : [],
|
||||||
avatarUrl: null,
|
avatarUrl: null,
|
||||||
|
|
Loading…
Reference in New Issue