You are here

function hook_nodejs_user_presence_list in Node.js integration 8

Same name and namespace in other branches
  1. 7 nodejs.api.php \hook_nodejs_user_presence_list()

Specifies the list of users that can see presence information (whether a user is connected to the Node JS server or not) about a given account.

Parameters

stdClass $account: The Drupal account of the user whose presence information access is being requested. This may be an anonymous user.

Return value

array An array of User ids, representing the users that can check the presence on the Node JS server of the user specified in $account.

1 invocation of hook_nodejs_user_presence_list()
nodejs_auth_check in ./nodejs.module
Checks the given key to see if it matches a valid session.

File

./nodejs.api.php, line 85
API documentation for the Nodejs integration module.

Code

function hook_nodejs_user_presence_list($account) {
  if ($account->uid > 0) {
    return array(
      array_keys(my_module_get_friends($account)),
    );
  }
}