Add 'Last modified by ...' footer to each page How do I add a footer to each page generated by Drupal (7) so to show the identity of the last user that modified that page? (together with the modification date)
I think you should be able to do this with something like this, note that this is only pseduo code and is not tested:

 // get the user that made the latest modification
 // for a node of type 'page'
 function getLatestPageUpdater() {
     $query = "SELECT n.changed, u.* FROM node n 
               INNER JOIN users u ON u.uid = n.uid
               WHERE n.type = 'page' 
               ORDER BY changed DESC 
               LIMIT 1";
     return db_query($query)-&gt;fetch();
 }


Then in your page.tpl.php you could do like this:

 &lt;?php $user = getLatestPageUpdater();
       if($user):
 ?&gt;
 &lt;p&gt;Last edited &lt;?php print $user-&gt;changed; ?&gt; by &lt;?php print $user-&gt;name; ?&gt;&lt;/p&gt;
 &lt;?php endif; ?&gt;


Like @tostinni pointed out Drupal doesn't track the last editor of a node, so the above code would always display the original author of the node. If you're using node revisions I think you should be able to do something like this (again this is only pseudo code and is not tested):

function getLatestPageUpdater($node) {
  $query = "SELECT u.name
            FROM node_revisions nr, users u
            WHERE nr.uid = u.uid
            AND nr.nid = ".$node-&gt;nid."
            ORDER BY timestamp DESC
            LIMIT 1";
  return db_query($query)-&gt;fetch();
}

&lt;?php if($node-&gt;type == "page"): ?&gt;
&lt;?php $user = getLatestPageUpdater($node); 
      if($user): 
?&gt;
&lt;p&gt;Last edited &lt;?php print $node-&gt;changed; ?&gt; by &lt;?php print $user-&gt;name; ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;