You are here

function revisioning_events_argument_current_revision_author in Revisioning 6.4

Same name and namespace in other branches
  1. 6.3 revisioning.rules.inc \revisioning_events_argument_current_revision_author()
  2. 7 revisioning.rules.inc \revisioning_events_argument_current_revision_author()

Current revision author argument handler.

1 string reference to 'revisioning_events_argument_current_revision_author'
_revisioning_rules_event_arguments in ./revisioning.rules.inc
Returns arguments suitable for using it with a node.

File

./revisioning.rules.inc, line 150
Rules integration for Revisioning module.

Code

function revisioning_events_argument_current_revision_author($node) {
  $current_vid = node_tools_get_current_node_revision_id($node->nid);
  $uid = $node->revision_uid;
  if ($node->vid != $current_vid) {
    $current = node_load($node->nid, $current_vid);
    $uid = $current->revision_uid;
  }
  $user = user_load($uid);
  return $user;
}