Преглед на файлове

Update users.js

change method to find existing user
Allemand преди 5 години
родител
ревизия
6d063a4f64
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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;