浏览代码

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';
       user.authenticationMethod = 'oauth2';
 
 
       // see if any existing user has this email address or username, otherwise create new
       // 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 }],
         $or: [{ 'emails.address': email }, { username: user.username }],
       });
       });
       if (!existingUser) return user;
       if (!existingUser) return user;