mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Remove all verificationTokens for a specific email once verified
This will break the other verification email links but it will keep the user document cleaner. The email will be verified anyways so who cares that the other verification links isn’t working any more. Closes #4626
This commit is contained in:
committed by
Sashko Stubailo
parent
d634651232
commit
f91da45458
@@ -739,7 +739,7 @@ Meteor.methods({verifyEmail: function (token) {
|
||||
{_id: user._id,
|
||||
'emails.address': tokenRecord.address},
|
||||
{$set: {'emails.$.verified': true},
|
||||
$pull: {'services.email.verificationTokens': {token: token}}});
|
||||
$pull: {'services.email.verificationTokens': {address: tokenRecord.address}}});
|
||||
|
||||
return {userId: user._id};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user