@@ -488,29 +488,29 @@ if (Meteor.isServer) {
488
488
return user ;
489
489
}
490
490
491
- // if (user.services.oidc) {
492
- // const email = user.services.oidc.email.toLowerCase();
493
- //
494
- // user.username = user.services.oidc.username;
495
- // user.emails = [{ address: email, verified: true }];
496
- // const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase();
497
- // user.profile = { initials, fullname: user.services.oidc.fullname };
498
- //
499
- // // see if any existing user has this email address or username, otherwise create new
500
- // const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]});
501
- // if (!existingUser)
502
- // return user;
503
- //
504
- // // copy across new service info
505
- // const service = _.keys(user.services)[0];
506
- // existingUser.services[service] = user.services[service];
507
- // existingUser.emails = user.emails;
508
- // existingUser.username = user.username;
509
- // existingUser.profile = user.profile;
510
- //
511
- // Meteor.users.remove({_id: existingUser._id}); // remove existing record
512
- // return existingUser;
513
- // }
491
+ // if (user.services.oidc) {
492
+ // const email = user.services.oidc.email.toLowerCase();
493
+ //
494
+ // user.username = user.services.oidc.username;
495
+ // user.emails = [{ address: email, verified: true }];
496
+ // const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase();
497
+ // user.profile = { initials, fullname: user.services.oidc.fullname };
498
+ //
499
+ // // see if any existing user has this email address or username, otherwise create new
500
+ // const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]});
501
+ // if (!existingUser)
502
+ // return user;
503
+ //
504
+ // // copy across new service info
505
+ // const service = _.keys(user.services)[0];
506
+ // existingUser.services[service] = user.services[service];
507
+ // existingUser.emails = user.emails;
508
+ // existingUser.username = user.username;
509
+ // existingUser.profile = user.profile;
510
+ //
511
+ // Meteor.users.remove({_id: existingUser._id}); // remove existing record
512
+ // return existingUser;
513
+ // }
514
514
515
515
if ( options . from === 'admin' ) {
516
516
user . createdThroughApi = true ;
0 commit comments