Show:

Users.Session Class

Extends Base.Users.Session
Module: Users

Class representing 'Session' rows in the 'Users' database
This table is used to replicate PHP sessions information for

Constructor

Users.Session

(
  • fields
)

Parameters:

  • fields Object

    The fields values to initialize table row as an associative array of {column: value} pairs

Item Index

Methods

Methods

pushNotifications

(
  • userIds
  • sessionIds
  • notifications
  • [callback]
)
static

Pushes notifications to the device corresponding the session ids.

Parameters:

  • userIds String | Array

    A user id, or an array of them, in which case sessionIds would be an object of { userId: sessionId } in which case notifications would be an object of { userId: notification }

  • sessionIds String | Object

    A session id, or an object of them

  • notifications Object

    Please see Users.Device.pushNotification for the spec

  • [callback] Function optional

    A function to call after the push has been completed

setUp

()

The setUp() method is called the first time an object of this class is constructed.