You are here

function heartbeat_related_uids in Heartbeat 7

Returns a set of users related to a central user.

2 calls to heartbeat_related_uids()
HeartbeatStream::createQuery in includes/heartbeatstream.inc
createQuery().
RelationsActivity::construct in modules/heartbeat_defaults/streams/relationsactivity.inc
Fake constructor to hook this method instead of the constructor.

File

./heartbeat.module, line 913
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_related_uids($uid) {
  static $uids;
  if (!isset($uids[$uid])) {
    $uids[$uid] = array(
      $uid => $uid,
    );
    foreach (module_implements('heartbeat_related_uids') as $module) {
      $function = $module . '_heartbeat_related_uids';
      if (function_exists($function)) {
        $uids[$uid] += $function($uid);
      }
    }
    $uids[$uid] = array_unique($uids[$uid]);
  }
  return $uids[$uid];
}