user relationships add/remove friend link in user profile node

При использовании модуля content_profile и user_relationships вы модифицируете шаблон user-profile.tpl.php, например в моём случае → у меня все профили - ноды. Код ниже позволит вам вывести ссылку Добавить/Удалить друга в ноде.

<?php
//add link
global $user;
$account = user_load($node->uid);
$actions = _user_relationships_ui_actions_between($user, $account);
if (count($actions)) {
  print theme('item_list', $actions);
}
?>