Meteor.methods({ updateCategories: function () { // TODO: see if this method is still necessary if(isAdmin(Meteor.user())){ Posts.find().forEach(function(post){ if(post.categories){ console.log('Found categories for post "'+post.title+'"'); Posts.update(post._id,{$set:{userId:post.user_id}}, function(error){ console.log(error); }); } }); } }, giveInvites: function () { if(isAdmin(Meteor.user())) Meteor.users.update({}, {$inc:{inviteCount: 1}}, {multi:true}); } });