Hello.

I followed the API description in the handbook (http://drupal.org/node/203396) but found that this has changed for D6.

e.g.

In D5, you call:
user_relationships_load($param = array(), $count = FALSE, $sort = 'rid', $order = NULL, $limit = NULL, $include_user_info = FALSE)

In D6, you call:
user_relationships_load($params, $options, FALSE); (where both $params and $options are arrays)

I am trying to call this function within a module function like so:

  $user_id = $GLOBALS['user']->name;
  $params = array("user" => $user_id, 'rtid' => 1);
  $options = array("count" => FALSE, 'sort' => 'rtid', 'order' => 'rid DESC', 'limit' => '10', 'include_user_info' => TRUE);
  $friends = user_relationships_load($params, $options, TRUE);
  $page_content = '';
  $page_content .= "<pre>";
  $page_content .= print_r($friends, true);
  $page_content .= "</pre>"; 
  return $page_content;

But the array is empty. Can someone point out what I'm doing wrong?

Thanks!

Comments

allanh’s picture

Status: Active » Closed (fixed)