Jelajahi Sumber

update onCreateUser for oidc

correct bug : remove the wrong user !
Allemand 5 tahun lalu
induk
melakukan
f6c377eb9f
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      models/users.js

+ 1 - 1
models/users.js

@@ -946,7 +946,7 @@ 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 }); // remove existing record
       return existingUser;
     }