javascript - Can you list users in Meteor without a login system? -


for example, if did chatroom ahve enter username (so don't log in), can still somehow list out people in chatroom? how can this?

instead of using normal meteor.users collection, easiest create own collection such simple authentication.

if wanted make simple (most likely, long didn't care if 2 people have same name), store name property of chat room message document.

edit - answer comment:

to detect when user disconnects, can add event handler in publish function this:

meteor.publish('some_collection', function(){   var connectionid = this.connection ? this.connection.id : 'server';   this._session.socket.on("close", meteor.bindenvironment(function(){     // deal connectionid closing   })); }); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -