Merge pull request #3489 from sato-64bit/fix-method-to-create-initials-on-oidc

changed method to create initials same as others for new user of oidc
This commit is contained in:
Lauri Ojansivu 2021-01-27 18:50:14 +02:00 committed by GitHub
commit 56c7b7a8f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1009,8 +1009,10 @@ if (Meteor.isServer) {
user.username = user.services.oidc.username;
user.emails = [{ address: email, verified: true }];
const initials = user.services.oidc.fullname
.match(/\b[a-zA-Z]/g)
.join('')
.split(/\s+/)
.reduce((memo, word) => {
return memo + word[0];
}, '')
.toUpperCase();
user.profile = {
initials,