diff options
author | Sheogorath | 2017-10-27 12:48:45 +0200 |
---|---|---|
committer | GitHub | 2017-10-27 12:48:45 +0200 |
commit | 881e800fd888fd24639a2709341a23612ed844f2 (patch) | |
tree | fbb12f251293a5e45291ba72ba1aca498e323c78 /lib/web/auth/ldap | |
parent | 94021e2d34390317406d55ecbc782c5ce345eef7 (diff) | |
parent | f93a14e3e1cb8f6589feb101d6b3b0effaf8ea61 (diff) |
Merge pull request #562 from SISheogorath/fix/LDAP
Fix LDAP problem about missing uidNumber
Diffstat (limited to '')
-rw-r--r-- | lib/web/auth/ldap/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js index 766c5cbc..9a63578a 100644 --- a/lib/web/auth/ldap/index.js +++ b/lib/web/auth/ldap/index.js @@ -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, |