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.

<?php
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

The same hear for D7.

Status:Active» Closed (fixed)

No longer time activity.