Meteor: Publishing all users to the client

Viewed 7233

Why would this not work?:

On both the client and server:

AllUsers = new Meteor.Collection('allUsers');

On the server only:

Meteor.publish('allUsers', function() {
return Meteor.users.find();
});

On the client only:

Deps.autorun(function(){
Meteor.subscribe("allUsers");
});

After I start up this app, AllUsers.find().count() is 0 but doing db.users.find().count() in the terminal gives the correct number (3). Even after I add a new user in the browser (using the standard ui-accounts package form), which should certainly cause the users collection to change, I still have no documents in my AllUsers collection. I'm beating my head against the wall trying to solve this!

1 Answers
Related