You are here

function heartbeat_heartbeat_related_uids in Heartbeat 7

Implements hook_heartbeat_related_uids().

File

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

Code

function heartbeat_heartbeat_related_uids($uid) {
  $uids = array();
  if (module_exists('flag_friend')) {
    foreach (flag_friend_get_friends($uid) as $account) {
      $uids[$account->uid] = $account->uid;
    }
  }
  if (module_exists('user_relationships')) {
    $result = user_relationships_load(array(
      'user' => $uid,
      'approved' => 1,
    ));
    foreach ($result as $account) {
      $uids[$account->requestee_id] = $account->requestee_id;
    }
  }
  return $uids;
}