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.
This commit is contained in:
parent
4bedd45f58
commit
96dda59fa0
@ -71,7 +71,7 @@ userSchema.statics.processProfile = (profile) => {
|
|||||||
email: primaryEmail,
|
email: primaryEmail,
|
||||||
provider: profile.provider,
|
provider: profile.provider,
|
||||||
providerId: profile.id,
|
providerId: profile.id,
|
||||||
name: profile.displayName || _.split(primaryEmail, '@')[0]
|
name: profile.displayName || profile.cn || _.split(primaryEmail, '@')[0]
|
||||||
}, {
|
}, {
|
||||||
new: true
|
new: true
|
||||||
}).then((user) => {
|
}).then((user) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user