mirror of https://github.com/status-im/codimd.git
Fix LDAP problem about missing uidNumber
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
parent
d1d6d5810b
commit
f93a14e3e1
|
@ -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 New Issue