Provides a UserSession
object that works just like Session
does, except it's persistent so you can preserve state across devices and sessions. It also provides a few extra useful methods.
NOTE: All of the methods defined below are also available on the server, with an additional userId
argument to specify which user's session variables you want to edit.
UserSession.set(key, value [, server: userId])
( anywhere ) - Set a new variable in the user sessionUserSession.get(key [, server: userId])
( anywhere ) - Get the value of a user session variableUserSession.delete(key [, server: userId])
( anywhere ) - Delete a user session variable, if it existsUserSession.equals(key, value [, server: userId])
( anywhere ) - Test if a user session variable is equal to a valueUserSession.list([server: userId])
( anywhere ) - Get all the user session variables as an object
- Install meteorite
mrt add user-session
- BenjaminRH
- digilord