Allow anonymous users to custom menus I recently inherited a legacy project that I've been trying to work with. I defined a custom menu using the menu hook but it looks like anonymous users can't access that menu and instead gets redirected to the user login page. This is a fairly large project and I'm trouble figuring out where exactly the call is intercepted and redirect. Any help would be great.

This is what the redirected looks like if it helps: localhost/user?destination=results

function test_results_menu() {
  $items = array();
  $items['results'] = array(
    'page callback' =&gt; 'display_test_results',
    'access callback' =&gt; 'test_results_resource_access'
  );
  return $items;
}

function test_results_resource_access() {
  return TRUE;
}

function display_test_results() {
  //  TODO Display results
  return "hi";
}


Update: The odd thing for me is that the project also recently got a rest endpoint using the services module which allows anonymous users to see the data there.
If you want your menu access by everyone set access callback TRUE(not need determine function and it pass TRUE,(maybe this is test and you want in future have condtional menu)).

function test_results_menu() {
  $items = array();
  $items['results'] = array(
     'title' =&gt; 'your title',
     'description' =&gt; 'menu description',
    'page callback' =&gt; 'display_test_results',
    'access callback' =&gt; TRUE,
  );
  return $items;
}


function display_test_results() {
  //  TODO Display results
   print "hi";
}


This will be work . please after any change in hook_menu clear your drupal cache.