Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi, I would like to split node comments in two groups:
- First one would be for comments from friends.
- Second one would be for comments from no-friends.
I have a view (views module) wich renders the comments for certain users indicated by an argument (wich is the users identification number). So, my final problem is how to get the users related to other. Something like:
$current_uid = $user->uid;
$rtype = 'friends'; // or its rtype code
$friends = get_related_users($current_uid, $rtype);
...
print get_view($view_name, $arg = $friends);
* Of course, that was just pseudocode.
I've search for a similar function in the code of the module but I haven't found anything. Any idea/suggestion/help about this issue?
Regards and thanks in advance.
Comments
Comment #1
mrf CreditAttribution: mrf commentedI don't think there is anything like that in the main module but have a look at User Relationship Locator the queries you need, or at least good starting points should all be there.