function hook_node_update

cis7 node.api.php hook_node_update($node)
cle7 node.api.php hook_node_update($node)
elmsmedia7 node.api.php hook_node_update($node)
icor7 node.api.php hook_node_update($node)
meedjum_blog7 node.api.php hook_node_update($node)
mooc7 node.api.php hook_node_update($node)

Respond to updates to a node.

This hook is invoked from node_save() after the database query that will update node in the node table is scheduled for execution, after the type-specific hook_update() is invoked, and after field_attach_update() is called.

Note that when this hook is invoked, the changes have not yet been written to the database, because a database transaction is still in progress. The transaction is not finalized until the save operation is entirely completed and node_save() goes out of scope. You should not rely on data in the database at this time as it is not updated yet. You should also note that any write/update database queries executed from this hook are also not committed immediately. Check node_save() and db_transaction() for more info.


$node: The node that is being updated.

Related topics

19 functions implement hook_node_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

book_node_update in modules/book/book.module
Implements hook_node_update().
book_title_override_node_update in sites/all/modules/elmsln_contrib/book_title_override/book_title_override.module
Implements hook_node_update().
cis_section_node_update in sites/all/modules/elmsln_contrib/cis_connector/features/cis_section/cis_section.module
Implements hook_node_update().
entity_crud_hook_test_node_update in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_node_update().
feeds_node_helper_import_node_update in sites/all/modules/elmsln_contrib/feeds_node_helper/features/feeds_node_helper_import/feeds_node_helper_import.module
Implements hook_node_update().

... See full list

4 invocations of hook_node_update()
EntityAPIController::save in sites/all/modules/ulmus/entity/includes/
Implements EntityAPIControllerInterface.
field_attach_update in modules/field/
Save field data for an existing entity.
update_check_requirements in ./update.php
Checks update requirements and reports errors and (optionally) warnings.
user_save in modules/user/user.module
Save changes to a user account or add a new user.


modules/node/node.api.php, line 714
Hooks provided by the Node module.


function hook_node_update($node) {
  db_update('mytable')->fields(array('extra' => $node->extra))->condition('nid', $node->nid)->execute();