Users.User Class
Class representing 'User' rows in the 'Users' database
Constructor
Users.User
-
fields
Parameters:
-
fields
ObjectThe fields values to initialize table row as an associative array of
{column: value}
pairs
Item Index
Methods
- clientsOnline static
- devices static
- setUp
Methods
clientsOnline
-
userId
-
[sessionId]
Get all the socket clients that a user has online
Parameters:
Returns:
Contains {clientId: client} pairs
devices
-
userId
-
appIds
-
callback
Gets an array of all devices associated with userId and passes it to callback. Data is filtered for platforms listed in config array {App}/cordova/platforms
Parameters:
-
userId
StringThe id of a user
-
appIds
ObjectAn object of {platform: appIds} pairs, where keys are the names of a platform in "Users"/"apps"/"platforms" array, and values are a string or array with the external app id registered with the platform.
-
callback
FunctionThe first parameter contains {platformName: devicesArray}
-
[size=40]
Calculate the url of a user's icon
Parameters:
-
[size=40]
Number optionalthe size of the icon to render.
Returns:
the url
setUp
()
The setUp() method is called the first time an object of this class is constructed.