Node access rebuild bonus

Last updated on
30 April 2025

You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules

Module developer information

The silent rebuilds will be automatically handled if a user has configured to do so, when you call <?php node_access_needs_rebuild(TRUE); ?>.
If you prefer, you can nominate certain nodes for rebuilding by making your module depend on this one, and then calling <?php node_access_rebuild_bonus_queue($nids); ?> where $nids is an array of Node IDs. You may want to ensure that <?php node_access_rebuild_bonus_will_process() == TRUE ?> or else this module won't automatically process nodes. For example (for the Drupal 7 version):

<?php
/**
 * Implements hook_init().
 */
function your-module-name_init() {
  if (!node_access_rebuild_bonus_will_process()) {
    drupal_set_message(
      t(
        'Your-module-name requires you turn on Ajax/cron processing in '
        . '<a href="!config">Node access rebuild bonus</a> configuration',
        array('!config' => 'admin/config/system/node_access_rebuild_bonus')
      ),
      'error'
    );
  }
}
?>

Help improve this page

Page status: Not set

You can: