How do I intercept a press on "Save" and get the nid? I want to get hold of the nid of the newly created node whenever a new node or comment is created by a user by pressing "Save" (and only when the user press "Save" - not when the node is created or saved by other means).

I've tried to create a custom submit handler to intercept the save by means of a custom submit handler:

$form['#submit'][] = 'mymodule_node_submit';


This handler intercepts the press on the "Save" button, but it is invoked too early. The nid of the node it is not yet available inside the submit handler.

What is the correct way of getting the nid whenever a new node is created by an interactive user?

I know there is a similar question here: Get node id of saved node - but the accepted solution (use hook_node_update()) is not correct.  hook_node_update() will also intercept calls when nodes are created programatically (for instance by the Feeds module), when there is no real user involved.
If you read through node_form() you will see that the Submit button has its own submit handler:

$form['actions']['submit'] = array(
  '#type' =&gt; 'submit',
  '#access' =&gt; variable_get('node_preview_' . $node-&gt;type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() &amp;&amp; isset($form_state['node_preview'])),
  '#value' =&gt; t('Save'),
  '#weight' =&gt; 5,
  '#submit' =&gt; array('node_form_submit'),
);


so you need to add your own submit handler to this

function MYMODULE_form_node_form_alter(&amp;$form, &amp;$form_state) {
  $form['actions']['submit']['#submit'][] = 'MYMODULE_node_form_submit';
}


Then inside that $form_state['nid'] or $form_state['node'] should have what you need.