Find if the drupal node is published or not published in node_save() I am trying to find if the user has set the node to be published when creating a node. Upon hitting save, the call to node_save() is done; I tried to call print_r($node), but nothing seems to show up in the data which relates to the publishing status of the node.

How would I find out if the node is set to be published? Is there a way I can find out if an alias is set?
You are looking for $node-&gt;status. The Node module defines two constants which you can use instead of 0/1 to make your code more readable:

/**
 * Node is not published.
 */
define('NODE_NOT_PUBLISHED', 0);

/**
 * Node is published.
 */
define('NODE_PUBLISHED', 1);


Example:

if ($node-&gt;status == NODE_PUBLISHED) {
  // Node is published.
}


Note that you should not alter node_save(). Instead, implement hook_nodeapi() to do something either before ($op is "presave") or after ($op is "insert"/"update") the node is saved.