How can I display a list of all LOGGED IN users with Meteor.js

╄→гoц情女王★ 提交于 2019-12-01 23:01:23

To change the users profile.login property you need to do Meteor.users.update(..) or call a server method that does that. Just changing the user object's property will not work.

Generally I would recommend to not persist the users state into the mondodb database but hold it in a Collection in memory.

The easiest might be to just use one of these packages:

or study their source code to see how to propagate the user status.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!