mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
Fix LDAP problem about missing uidNumber
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
parent
d1d6d5810b
commit
f93a14e3e1
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue