[development] Using drupal_access_denied()
David Hart
david.hart at gmail.com
Wed Mar 24 14:37:11 UTC 2010
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" <leerowlands at rowlands-bcs.com>
> Subject: Re: [development] Using drupal_access_denied()
> To: <development at drupal.org>
> Message-ID: <000501caca84$290afc00$7b20f400$@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).
>
>
>
More information about the development
mailing list