title: Drupal 7 Access Callback Not Working Properly
body: <p>Drupal 7 Hook_menu access callback is not returning the correct boolean.</p>
  
  <p>Before we begin. YES! Cache is cleared... a lot.</p>
  
  <p>I implemented a simple function for testing:</p>
  
  <pre><code>$items['tutor_review_selection'] = array(
      'title'             =&gt; t('example'),
      'page callback'     =&gt; 'my_module_example_page',
      'access callback'   =&gt; my_module_access( array('administrator') ),
      'type'              =&gt; MENU_NORMAL_ITEM
  );
  
  function my_module_access( $roles ) {
      global $user;
  
      $check = array_intersect($roles, array_values($user-&gt;roles));
  
      return empty( $check ) ? FALSE : TRUE;
  }
  </code></pre>
  
  <p>This returns TRUE for logged in and logged out users.</p>
  
  <p><strong>Here is the important part:</strong></p>
  
  <p>I call 'my_module_access' function in 'my_module_example_page' function and it works correctly.</p>
  
  <p>Can anyone shine some light onto why this would not work in access callback?</p>
  
  <p>Maybe something to do with order of operation?</p>
  
  <p>Cache is cleared.</p>