function friendlist_activity_get_friends in Heartbeat 6.3
Same name and namespace in other branches
- 6.4 modules/friendlist_activity/friendlist_activity.module \friendlist_activity_get_friends()
Generate the view of people that a user is following
1 call to friendlist_activity_get_friends()
- friendlist_activity_heartbeat_related_uid_info in modules/
friendlist_activity/ friendlist_activity.module - Implementation of hook_heartbeat_related_uid_info()
File
- modules/
friendlist_activity/ friendlist_activity.module, line 92
Code
function friendlist_activity_get_friends($uid) {
$uids = array();
if (variable_get('heartbeat_add_friends_to_personal', TRUE)) {
$sql = "SELECT fr.requestee_id as 'uid' FROM {friendlist_relations} as fr\n\t INNER JOIN {friendlist_statuses} fs ON fs.rid = fr.rid\n\t WHERE fr.requester_id = %d AND fs.status = '%s' ORDER BY fs.last_update_time DESC, fr.rid DESC";
$result = db_query($sql, $uid, 'TW_BOTH');
while ($row = db_fetch_object($result)) {
$uids[] = $row->uid;
}
}
return $uids;
}