Browse Source

update onCreateUser for oidc

correct bug : remove the wrong user !
Allemand 5 years ago
parent
commit
f6c377eb9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/users.js

+ 1 - 1
models/users.js

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