t('Revision author email'), 'type' => 'text', 'description' => t('The email of the author of the current revision of the node.'), 'computed' => TRUE, 'field' => FALSE, ); } /** * Implements hook_tokens(). */ function planteome_rules_tokens($type, $tokens, array $data = array(), array $options = array()) { if ($type == 'entity' && $data['entity_type'] == 'node') { $values = array (); foreach ($tokens as $name => $original) { switch ($name) { case 'current-revision-author-mail': $node = $data['entity']; $account = user_load ($node->revision_uid); $values[$original] = $account->mail; break; } } return $values; } }