Browse Source

Update users.js

change method to find existing user
Allemand 5 năm trước cách đây
mục cha
commit
6d063a4f64
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      models/users.js

+ 1 - 1
models/users.js

@@ -933,7 +933,7 @@ if (Meteor.isServer) {
       user.authenticationMethod = 'oauth2';
 
       // see if any existing user has this email address or username, otherwise create new
-      const existingUser = Meteor.users.findOne({
+      const existingUser = Users.findOne({
         $or: [{ 'emails.address': email }, { username: user.username }],
       });
       if (!existingUser) return user;