mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 22:17:16 -04:00
Update users.js
change method to find existing user
This commit is contained in:
parent
983714cd72
commit
6d063a4f64
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue