You are here

function oa_core_update_access_records in Open Atrium Core 7.2

Update the node_access_records of the given nodes.

Parameters

array $nids: Node nids that need updated node grants.

3 calls to oa_core_update_access_records()
oa_core_node_update in includes/oa_core.access.inc
Implements hook_node_update().
oa_core_update_7236 in ./oa_core.install
Update Group and Space node access grants.
_oa_core_update_access_records_batch in includes/oa_core.access.inc
Batch for updating node access records.

File

includes/oa_core.access.inc, line 274
Code for Access Control functions for OpenAtrium spaces

Code

function oa_core_update_access_records($nids) {
  drupal_static_reset('oa_core_node_grants');
  foreach ($nids as $nid) {
    $node = node_load($nid);

    // Clear the static node cache for the space node so correct access
    // values are tested in hook_node_access_records.
    entity_get_controller('node')
      ->resetCache(array(
      $nid,
    ));

    // Update the node grants.
    node_access_acquire_grants($node);
  }
}