diff options
author | Allemand <37148072+salleman33@users.noreply.github.com> | 2020-06-17 18:07:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 18:07:22 +0200 |
commit | 6d063a4f64bbe133cb182fdd9d2d97defc60a8fd (patch) | |
tree | 6e7702a30f67e814b7e53879b237de4a42bfcfb1 /models | |
parent | 983714cd7298746dd7437b91cc9464b23b9a1bfd (diff) | |
download | wekan-6d063a4f64bbe133cb182fdd9d2d97defc60a8fd.tar.gz wekan-6d063a4f64bbe133cb182fdd9d2d97defc60a8fd.tar.bz2 wekan-6d063a4f64bbe133cb182fdd9d2d97defc60a8fd.zip |
Update users.js
change method to find existing user
Diffstat (limited to 'models')
-rw-r--r-- | models/users.js | 2 |
1 files changed, 1 insertions, 1 deletions
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; |