You are here

function node_authlink_node_load in Node authorize link 7

Same name and namespace in other branches
  1. 8 node_authlink.module \node_authlink_node_load()

Implements hook_node_load().

Appends authkey to loaded node object.

File

./node_authlink.module, line 144
Provides functionality for the node_authlink module.

Code

function node_authlink_node_load($nodes, $types) {
  foreach ($nodes as $nid => $node) {

    // TODO: check node type (performance)
    if ($authkey = node_authlink_load_authkey($nid)) {
      $nodes[$nid]->authkey = $authkey;
    }
  }
}