Problem

Adding a login check to hook_menu_get_item_alter should permit all
access menu checks to be correctly authenticated. The current
check only checks for external authentication when the page access
itself is checked, but there's no guarantee that the current
menu item will be the first menu item retrieved.

Solution

A simple drupal_static that ensures that the first call to
hook_menu_get_item_alter always checks the authentication does not
rely on any ordering, and should work for all themes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sshambar’s picture

Attached patch to use drupal_static variable to check login first time menu_get_item is called.

sshambar’s picture

Status: Active » Closed (fixed)

Merged into dev branch, thanks!