summaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
authorSheogorath2017-10-07 01:49:43 +0200
committerSheogorath2017-10-12 14:52:28 +0200
commitf93a14e3e1cb8f6589feb101d6b3b0effaf8ea61 (patch)
tree5f23393e41116e521d51aff42bfe8392ba7641ec /lib/web
parentd1d6d5810b12645ddb02275ce0c2498b2189a8a0 (diff)
Fix LDAP problem about missing uidNumber
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib/web')
-rw-r--r--lib/web/auth/ldap/index.js5
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,