In my server fixture, I'm populating the database with some test users using the Accounts.createUser
function. Now, I'm trying to figure out how to flag the email of the created user as verified.
I've tried to set the verified
flag directly but it doesn't work:
Meteor.users.findOne(userId).emails[0].verified = true
If you want to update your user and set the verified flag to true. Try this.
Meteor.users.update(userId, {$set: {"emails.0.verified" :true}});
This will update the first email in the emails: []
array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With