Hi, How can I remove the comments column in user relationship ..

Comments

marcmarc_’s picture

I have the same problem. And I would also like to remove the 'Comments' field on the 'Request relationship' page.

fazley_ryan’s picture

Though its an old post, still I am posting my solution as I couldnt find a proper way to do it. I used hook_menu_alter to do all this:

$items["user/%user/relationships/requested/%user_relationships/approve"] = array(
'title' => 'Approve Relationship',
'type' => MENU_CALLBACK,
'page callback' => 'custom_module_custom_ur_approve_callback',
'page arguments' => array('approve', 1, 4),
'access callback' => 'user_access',
'access arguments' => array('access content'),
);
}
function custom_module_custom_ur_approve_callback($requestee, $rtid, $relationship) {
user_relationships_save_relationship($relationship, $action = 'approve');
drupal_goto();
}

I hope it shall help..

rakesh.nimje84@gmail.com’s picture

Issue summary: View changes

Do not install User Relationships Elaborations module from User Relationships Package.

kyletaylored’s picture

I'm just reposting fazley_ryan's response in a code snippet that's easier to read.

$items["user/%user/relationships/requested/%user_relationships/approve"] = array(
  'title' => 'Approve Relationship',
  'type' => MENU_CALLBACK,
  'page callback' => 'custom_module_custom_ur_approve_callback',
  'page arguments' => array('approve', 1, 4),
  'access callback' => 'user_access',
  'access arguments' => array('access content'),
  );
}
function custom_module_custom_ur_approve_callback($requestee, $rtid, $relationship) {
  user_relationships_save_relationship($relationship, $action = 'approve');
  drupal_goto();
}