Prechádzať zdrojové kódy

Update users.js

issue #3099 : we have to delete the existing user, Account Service create it again
Allemand 5 rokov pred
rodič
commit
c5e0832e00
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      models/users.js

+ 2 - 1
models/users.js

@@ -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;
     }