Closed (fixed)
Project:
User Relationships
Version:
6.x-1.0-beta9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2008 at 23:42 UTC
Updated:
15 Nov 2008 at 09:25 UTC
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
Comment #1
allanh commentedhttp://drupal.org/node/334561