Merge pull request #3206 from salleman33/patch-2

Update users.js
This commit is contained in:
Lauri Ojansivu 2020-07-10 14:10:45 +03:00 committed by GitHub
commit c7a40784e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -946,7 +946,8 @@ if (Meteor.isServer) {
existingUser.profile = user.profile;
existingUser.authenticationMethod = user.authenticationMethod;
Meteor.users.remove({ _id: existingUser._id }); // remove existing record
Meteor.users.remove({ _id: user._id });
Meteor.users.remove({ _id: existingUser._id }); // is going to be created again
return existingUser;
}