Hi,
i’m trying to find a way for update a field for all my users in a method.
Is there any solution for do it ?
Thanks.
Hi,
i’m trying to find a way for update a field for all my users in a method.
Is there any solution for do it ?
Thanks.
Yes, you could use the MongoDB $set-Operator along with the multi-Operator http://docs.mongodb.org/manual/reference/method/db.collection.update/#multi-parameter
Meteor.users.update({}, {
$set: { attribute: 'some_value' }
}, { multi: true });