Community Documentation

Force the content author to the current user

Last updated November 19, 2007. Created by Amitaibu on July 2, 2007.
Edited by Michelle, fago. Log in to edit this page.

Required modules: -

array (
  'config3' =>
  array (
    '#type' => 'configuration',
    '#label' => 'Force content author to current user',
    '#event' => 'node_update',
    '#active' => true,
    '#module' => 'workflow-ng',
    0 =>
    array (
      '#type' => 'condition',
      '#negate' => 1,
      '#argument map' =>
      array (
        'author' => 'user1',
        'user' => 'user2',
      ),
      '#name' => 'workflow_ng_condition_user_comparison',
      '#label' => 'user is content author',
    ),
    1 =>
    array (
      '#type' => 'action',
      '#argument map' =>
      array (
        'node' => 'node',
        'user' => 'author',
      ),
      '#name' => 'workflow_ng_action_node_set_author',
      '#label' => 'Set the current user as content author',
    ),
    '#name' => 'config3',
  ),
)
Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.