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.
How do I redirect the CP edit tab (node/nid/edit) to the User edit tab for the CP type (user/uid/edit/profile). I have multiple CP types - is there a way to integrate the $type variable.
I tried changing this function, but it has no affect. Ideally I'd like to but this in my custom module to keep the CP module clean.
function content_profile_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if ($op == 'prepare' && is_content_profile($node) && !isset($node->nid) && $node->uid && !user_access('administer nodes') && arg(0) != 'admin') {
// Check if this nodetype already exists
if ($nid = content_profile_profile_exists($node, $node->uid)) {
// This node already exists, redirect to edit page
drupal_goto('user/'. $node->uid .'/edit/profile', 'destination=user/'. $node->uid); //changed
// drupal_goto('node/'. $nid .'/edit', 'destination=user/'. $node->uid);
}
}...
Comments
Comment #1
RaulMuroc CreditAttribution: RaulMuroc commentedThe same hear for D7.
Comment #2
RaulMuroc CreditAttribution: RaulMuroc commentedNo longer time activity.