Yeah, it looks like it was too late. I ended up using hook_nodeapi and
everything seems to be working fine.

> Date: Tue, 23 Mar 2010 22:27:08 +1000
> From: "Lee Rowlands" <[email protected]>
> Subject: Re: [development] Using drupal_access_denied()
> To: <[email protected]>
> Message-ID: <000501caca84$290afc00$7b20f4...@com>
> Content-Type: text/plain;       charset="us-ascii"
>
> 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).
>
>
>

Reply via email to