Fix issue creating users with username from OAuth

Closes #5222
pull/5275/head
Rodrigo Nascimento 9 years ago
parent 932cce4da7
commit 0802e86031
No known key found for this signature in database
GPG Key ID: 2C85B3AFE75D23F9
  1. 5
      packages/rocketchat-custom-oauth/custom_oauth_server.js

@ -252,6 +252,11 @@ export class CustomOAuth {
return;
}
// User already created or merged
if (user.services && user.services[serviceName] && user.services[serviceName].id === serviceData.id) {
return;
}
if (this.mergeUsers !== true) {
throw new Meteor.Error('CustomOAuth', `User with username ${user.username} already exists`);
}

Loading…
Cancel
Save