hook_node_insert() and drupal_goto conflicts with each other? I find some strange problem. I use hook_node_insert(). In order to create the other node after the user create the specific node! Then, I redirect the user to the other pages
But there are some error messages that i can't figure out!

the below code is my hook_node_insert()

function campaign_node_insert($node)
{
    global $user;
    global $base_url;

    if($node-&gt;type=="my_content_type")
    {

            $userid=$user-&gt;uid;

        /**

                My code is right here !


               **/


               drupal_goto('/user/'.$userid);


          }
}


My error Message is as belowed :
You can't use drupal_goto() in hook_node_insert() and other node_hooks too. The reason is that there is a queue of hooks that are executed on node insert and if you run drupal_goto() in some hook - all other hooks which goes after will not execute!

If you need redirect user after node insert to some url - implement hook_form_alter for node_form and add new submit callback $form['actions']['submit']['#submit'][] = 'my_module_submit_callback'. In this callback you will get $form_state with all $node fields and you can perform you redirect by specifying $form['#redirect'] = 'some/url'.