function menu_tree_check_access


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 menu_tree_check_access(&$tree, $node_links = array())
cle7 menu_tree_check_access(&$tree, $node_links = array())
elmsmedia7 menu_tree_check_access(&$tree, $node_links = array())
icor7 menu_tree_check_access(&$tree, $node_links = array())
meedjum_blog7 menu_tree_check_access(&$tree, $node_links = array())
mooc7 menu_tree_check_access(&$tree, $node_links = array())

Checks access and performs dynamic operations for each link in the tree.


$tree: The menu tree you wish to operate on.

$node_links: A collection of node link references generated from $tree by menu_tree_collect_node_links().

Related topics

3 calls to menu_tree_check_access()
book_menu_subtree_data in modules/book/book.module
Gets the data representing a subtree of the book hierarchy.
menu_build_tree in includes/
Builds a menu tree, translates links, and checks access.
menu_overview_form in modules/menu/
Form for editing an entire menu tree at once.


includes/, line 1487
API for the Drupal menu system.


function menu_tree_check_access(&$tree, $node_links = array()) {
  if ($node_links) {
    $nids = array_keys($node_links);
    $select = db_select('node', 'n');
    $select->addField('n', 'nid');
    $select->condition('n.status', 1);
    $select->condition('n.nid', $nids, 'IN');
    $nids = $select->execute()->fetchCol();
    foreach ($nids as $nid) {
      foreach ($node_links[$nid] as $mlid => $link) {
        $node_links[$nid][$mlid]['access'] = TRUE;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.