Sharing values between users


#1

How can I use a Session that get set inside a {{currentUser}} to the outside?


#2

Why a Session ? Can you expand the question with an example?

For ex. i show user name on a intranet login error with a HELPER … just that.
Like:
“Hey John Doe, you password is wrong, try again”

Most of the time Sessions are not the solution…


#3

Examples would really help


#4

I got the wrong focus on this one, the session mean to be compared inside an if but I move that value to the db and got easier to handle


#5

@oarim you are giving us a small context, please expand the question with a better example or situation.


#6

Sessions are only ever set on the client side, and are lost when the client closes or hard refreshes.

If you want to carry that data through to the server you need to use Meteor.call() and a Meteor.method() or store the data in a published Mongo collection.