Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, How can I remove the comments column in user relationship ..
Hi, How can I remove the comments column in user relationship ..
Comments
Comment #1
marcmarc_ CreditAttribution: marcmarc_ commentedI have the same problem. And I would also like to remove the 'Comments' field on the 'Request relationship' page.
Comment #2
fazley_ryan CreditAttribution: fazley_ryan commentedThough 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..
Comment #3
rakesh.nimje84@gmail.com CreditAttribution: rakesh.nimje84@gmail.com commentedDo not install User Relationships Elaborations module from User Relationships Package.
Comment #4
kyletaylored CreditAttribution: kyletaylored commentedI'm just reposting fazley_ryan's response in a code snippet that's easier to read.