From 6d063a4f64bbe133cb182fdd9d2d97defc60a8fd Mon Sep 17 00:00:00 2001 From: Allemand <37148072+salleman33@users.noreply.github.com> Date: Wed, 17 Jun 2020 18:07:22 +0200 Subject: Update users.js change method to find existing user --- models/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/users.js b/models/users.js index 2b5a059e..a1928f97 100644 --- a/models/users.js +++ b/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; -- cgit v1.2.3-1-g7c22