Commit 96dda59f authored by Eric Knibbe's avatar Eric Knibbe Committed by Nicolas Giard

also check "cn" attribute for display name

LDAP queries to Open Directory on macOS Server don't include a "displayName" attribute, but the first name + surname combo is available in the "cn" attribute.
parent 4bedd45f
......@@ -71,7 +71,7 @@ userSchema.statics.processProfile = (profile) => {
email: primaryEmail,
provider: profile.provider,
providerId: profile.id,
name: profile.displayName || _.split(primaryEmail, '@')[0]
name: profile.displayName || profile.cn || _.split(primaryEmail, '@')[0]
}, {
new: true
}).then((user) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment