drupal_access_denied

Versions
4.6 – 7
drupal_access_denied()

Deliver a "access denied" error to the browser.

Page callback functions wanting to report an "access denied" message should return MENU_ACCESS_DENIED instead of calling drupal_access_denied(). However, functions that are invoked in contexts where that return value might not bubble up to menu_execute_active_handler() should call drupal_access_denied().

▾ 11 functions call drupal_access_denied()

book_export_html in modules/book/book.pages.inc
This function is called by book_export() to generate HTML for export.
contact_personal_form in modules/contact/contact.pages.inc
Form builder; the personal contact form.
contact_site_form in modules/contact/contact.pages.inc
Form builder; the site-wide contact form.
file_download in includes/file.inc
Menu handler for private file transfers.
image_style_generate in modules/image/image.module
Menu callback; Given a style and image path, generate a derivative.
page_example_baz in developer/examples/page_example.module
A more complex page callback that takes arguments.
profile_browse in modules/profile/profile.pages.inc
Menu callback; display a list of user information.
shortcut_link_add_inline in modules/shortcut/shortcut.admin.inc
Menu callback; Creates a new link in the provided shortcut set
system_batch_page in modules/system/system.admin.inc
Default page callback for batches.
user_cancel_confirm in modules/user/user.pages.inc
Menu callback; Cancel a user account via e-mail confirmation link.
user_pass_reset in modules/user/user.pages.inc
Menu callback; process one time login link and redirects to the user page on success.

Code

includes/common.inc, line 755

<?php
function drupal_access_denied() {
  drupal_deliver_page(MENU_ACCESS_DENIED);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.