What is the best way to stop a node from loading in a node hook? I want to use hook_node_view to stop a node from loading if it was not created by the user trying to access it. What should I include in the following code to kill the loading of the node?

function hook_node_view($node, $view_mode, $langcode) {

    global $user;
    $currUser = $user-&gt;uid;
    $nodeUser = $node-&gt;uid;

    if ($currUser != $nodeUser){    
        drupal_set_message('kill page');
  }
}
You can't prevent a node from loading but you can deny/grant access to it. Write a custom module and implement hook_node_grants($account, $op) &amp;&amp; hook_node_access_records($node). Here is a good example.

or, you can implement hook_node_access($node, $op, $account) but this hook will not be invoked  for node listings (e.g., RSS feeds, the default home page at path 'node', a recent content block, etc.)