Assigning revision owner when moderating backwards with Workbench I have a site that has a complex set of permissions and roles to support a workflow we have defined with Workbench Moderation.  This particular workflow has the "normal" three states:


Draft
Needs Review
Published


The workflow is set up to allow both forward progression through the workflow (eg, Draft to Needs Review) and also backwards (eg, Needs Review to Draft).  The site also uses the basic features in Workbench, and content creators like the My Content, My Drafts, and Needs Review, etc, pages / views that it provides.

OK, here is my problem.  One of the common tasks are editors pushing nodes back to Draft status for original authors to do major work on.  The problem is that if you examine node_save, revisions have their $uid set to the used who did the save (ie, $user-&gt;uid).  In this case, it would be the editor.  Therefore, the new draft shows up in the editor's queue and not the original author's (if you examine the view for this page, you can verify this behavior). 

I am curious whether others have run into this problem and how they solved it.

Using a hook_node_presave to set the isn't an option, as it fires too soon, and node_save would nuke any changes, anyway.

I suspect that I could do a hook_node_update, eg

function mymodule_node_update ($node)
{
  db_update('node_revision')
    -&gt;fields(array('uid' =&gt; $node-&gt;uid))
    -&gt;condition('nid', $node-&gt;nid)
    -&gt;condition('vid', $node-&gt;vid)
    -&gt;execute();
}


but I am worried that there may be side effects that I am not considering.

Are there better options?
Old question, but in response to the comment, this is the solution that I deployed.  As far as I know, it has been working well:&nbsp;

/**
 * Implements hook_node_update().
 */    
function mymodule_node_update($node) {
  db_update('node_revision')
    -&gt;fields(array('uid' =&gt; $node-&gt;uid))
    -&gt;condition('nid', $node-&gt;nid)
    -&gt;condition('vid', $node-&gt;vid)
    -&gt;execute();
}

/**
 * Implements hook_workbench_moderation_transition().
 */
function mymodule_workbench_moderation_transition($node, $previous_state, $new_state) {
  if (isset($node-&gt;nid) &amp;&amp; isset($node-&gt;vid) &amp;&amp; isset($node-&gt;uid)) {
    mymodule_node_update($node);
  }
}


This covers the case where a user updates a node via the edit form, and when a user pushes a node through moderation via the workflow forms.