How can I check if the author of the current node is the current logged in user?
I have managed to work it out! Below is the code for checking whether the current user is viewing content they are an author of:

global $user;
if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1))) {
  // Get the nid
  $nid = arg(1);

  // Load the node if you need to
  $node = node_load($nid);
}

if($node-&gt;uid == $user-&gt;uid){
return TRUE;
} else {
return FALSE;
}


Hope this is helpful to someone.