You are here

function hook_nodejs_user_presence_list in Node.js integration 7

Same name and namespace in other branches
  1. 8 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 function implements hook_nodejs_user_presence_list()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

nodejs_buddylist_nodejs_user_presence_list in nodejs_buddylist/nodejs_buddylist.module
Implements hook_nodejs_user_presence_list().
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)),
    );
  }
}