node_assign_owner_action

Versions
6
node_assign_owner_action(&$node, $context)
7
node_assign_owner_action($node, $context)

Implementation of a configurable Drupal action. Assigns ownership of a node to a user.

Code

modules/node/node.module, line 2675

<?php
function node_assign_owner_action(&$node, $context) {
  $node->uid = $context['owner_uid'];
  $owner_name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $context['owner_uid']));
  watchdog('action', 'Changed owner of @type %title to uid %name.', array('@type' => node_get_types('type', $node), '%title' => $node->title, '%name' => $owner_name));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.