Created a new folder in _templates to house site icons. Put the new RSS standard...
[elgg.git] / units / friends / get_friends.php
bloba1557cc6d133175f3f5136cfd3d00152a779e2eb
1 <?php
2 global $CFG;
3 // Gets all the friends of a particular user, as specified in $parameter[0],
4 // and return it in a data structure with the idents of all the users
6 $ident = (int) $parameter[0];
7 /*
8 if (!isset($_SESSION['friends_cache'][$ident]) || (time() - $_SESSION['friends_cache'][$ident]->created > 120)) {
9 $_SESSION['friends_cache'][$ident]->created = time();
10 $_SESSION['friends_cache'][$ident]->data = get_records_sql('SELECT f.friend AS user_id,u.name FROM '.$CFG->prefix.'friends f
11 JOIN '.$CFG->prefix.'users u ON u.ident = f.friend
12 WHERE f.owner = ?',array($ident));
14 $run_result = $_SESSION['friends_cache'][$ident]->data;*/
16 $run_result = get_records_sql('SELECT f.friend AS user_id,u.name FROM '.$CFG->prefix.'friends f
17 JOIN '.$CFG->prefix.'users u ON u.ident = f.friend
18 WHERE f.owner = ?',array($ident));