You are here

function node_access_test_node_load in Drupal 7

Implements hook_node_load().

File

modules/node/tests/node_access_test.module, line 191
A dummy module implementing node access related hooks for testing purposes.

Code

function node_access_test_node_load($nodes, $types) {
  $result = db_query('SELECT nid, private FROM {node_access_test} WHERE nid IN(:nids)', array(
    ':nids' => array_keys($nodes),
  ));
  foreach ($result as $record) {
    $nodes[$record->nid]->private = $record->private;
  }
}