Closed lam0620 closed 4 years ago
Do you still have autopublish on your Meteor installation? If so, then the publish/subscribe methods that would normally update will not run.
Thanks @BobbyWalkerTech
autopublish is not a direct dependency in this project. auto login after Accounts.createUser(XXX) and the roles is empty (as above my question)
Note: When create new user and auto login case At my development mode, I can get correct roles. But on my production (built production mode), the roles is empty
It become OK (correct roles) after refresh (F5) browser.
Please help!
This should work. So a reproduction would be needed if it does not work for you.
Hi,
Anybody help me. I'm new meteor. In my app, when user login, the system check if user not exist, new user will be created with roles XXX, YYY(Roles.setUserRoles) and then auto login too. At home page, roles return empty (Roles.getRolesForUser(loggedInUser)) If I log out and login again, I can get correct roles.
How can I get roles of logged in user in case create new user and auto login. How can I publish created user/roles to client after role creation?
Thanks, lam0620