Update users.js

issue #3099 : we have to delete the existing user, Account Service create it again
This commit is contained in:
Allemand 2020-07-10 10:06:39 +02:00 committed by GitHub
parent eb4219504d
commit c5e0832e00
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;
}