summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllemand <37148072+salleman33@users.noreply.github.com>2020-07-10 10:06:39 +0200
committerGitHub <noreply@github.com>2020-07-10 10:06:39 +0200
commitc5e0832e00567272f684ec2b5b9eafddb4bd737a (patch)
treead8bbd823a7d041f742a649481f2f39c19b7e984
parenteb4219504d35265d5305bbb2729cc11dc51ef423 (diff)
downloadwekan-c5e0832e00567272f684ec2b5b9eafddb4bd737a.tar.gz
wekan-c5e0832e00567272f684ec2b5b9eafddb4bd737a.tar.bz2
wekan-c5e0832e00567272f684ec2b5b9eafddb4bd737a.zip
Update users.js
issue #3099 : we have to delete the existing user, Account Service create it again
-rw-r--r--models/users.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/users.js b/models/users.js
index 2b5a059e..7c5d2855 100644
--- a/models/users.js
+++ b/models/users.js
@@ -946,7 +946,8 @@ if (Meteor.isServer) {
existingUser.profile = user.profile;
existingUser.authenticationMethod = user.authenticationMethod;
- Meteor.users.remove({ _id: existingUser._id }); // remove existing record
+ Meteor.users.remove({ _id: user._id });
+ Meteor.users.remove({ _id: existingUser._id }); // is going to be created again
return existingUser;
}