$node_table_values = array('nid' => $node->nid, 'vid' => $node->vid,
                    'title' => $node->title, 'type' => $node->type, 'uid' => $node->uid,
                    'status' => $node->status, 'created' => $node->created,
                    'changed' => $node->changed, 'comment' => $node->comment,
                    'promote' => $node->promote, 'moderate' => $node->moderate,
                    'sticky' => $node->sticky);

should read

$node_table_values = array('nid' => $node->nid, 'vid' => $node->vid,
                    'title' => $node->title, 'type' => $node->type, 'uid' => $user->uid,
                    'status' => $node->status, 'created' => $node->created,
                    'changed' => $node->changed, 'comment' => $node->comment,
                    'promote' => $node->promote, 'moderate' => $node->moderate,
                    'sticky' => $node->sticky);

Comments

Zen’s picture

Priority: Critical » Minor
Status: Active » Closed (works as designed)

a) Please don't mark non-critical stuff as critical.
b) If there's a bug, please state what it is.
c) Please provide all modifications in patch form. ( http://drupal.org/diffandpatch )
d) This isn't a bug. $node stores the uid of the user who created the node. $user stores the uid of the current user. They don't necessarily have to be the same.

Marking by design - please reopen if you still believe there's an issue here.
Thanks :)
-K