23 Mar
2010
23 Mar
'10
1:27 p.m.
Hi, By the time you get to preprocess_page it's probably too late for drupal_access_denied, for the same reasons as drupal_add_js doesn't work in preprocess_page functions (see http://www.drupaler.co.uk/blog/joys-preprocessing/70), perhaps you might need to use hook_menu_alter instead and override the access callback? Lee
If I do:
function mymodule_preprocess_page(&$vars) { if ($some_condition) { drupal_access_denied(); exit; } }
I just get a white page (which is a 403 page looking at the header, not a 500).