function node_access_example_node_load
Implements hook_node_load().
Gather and add the private setting for the nodes Drupal is loading.
See also
Related topics
File
-
node_access_example/
node_access_example.module, line 408
Code
function node_access_example_node_load($nodes, $types) {
$result = db_query('SELECT nid, private FROM {node_access_example} WHERE nid IN(:nids)', array(
':nids' => array_keys($nodes),
));
foreach ($result as $record) {
$nodes[$record->nid]->private = $record->private;
}
}