You are here

function template_preprocess_user_relationships_actions_block in User Relationships 7

Same name and namespace in other branches
  1. 6 user_relationship_blocks/user_relationship_blocks.module \template_preprocess_user_relationships_actions_block()

Template pre processor for the relationship actions block

File

user_relationship_blocks/user_relationship_blocks.module, line 401
User Relationship Blocks implementation @author Jeff Smick (creator) @author Alex Karshakevich (maintainer) http://drupal.org/user/183217

Code

function template_preprocess_user_relationships_actions_block(&$variables) {
  $user =& $variables['user'];
  $account =& $variables['account'];
  if ($user != $account) {
    $variables['current_relationships'] = user_relationships_ui_actions_between($user, $account, array(
      'remove' => 1,
    ));
  }
  $variables['actions'] = user_relationships_ui_actions_between($user, $account, array(
    'add' => 1,
    'requested' => 1,
    'received' => 1,
  ));
}