Community Documentation

drupal_access_denied

5 common.inc drupal_access_denied()
6 common.inc drupal_access_denied()
7 common.inc drupal_access_denied()
8 common.inc drupal_access_denied()

Delivers an "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().

Related topics

▾ 15 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 constructor for the personal contact form.
contact_site_form in modules/contact/contact.pages.inc
Form constructor for the site-wide contact form.
file_download in includes/file.inc
Menu handler for private file transfers.
image_style_deliver in modules/image/image.module
Menu callback; Given a style and image path, generate a derivative.
menu_delete_menu_page in modules/menu/menu.admin.inc
Menu callback; check access and get a confirm form for deletion of a custom menu.
menu_item_delete_page in modules/menu/menu.admin.inc
Menu callback; Check access and present a confirm form for deleting a menu link.
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 page callback: creates a new link in the provided shortcut set.
system_batch_page in modules/system/system.admin.inc
Default page callback for batches.
system_theme_default in modules/system/system.admin.inc
Menu callback; Set the default theme.
system_theme_disable in modules/system/system.admin.inc
Menu callback; Disables a theme.
system_theme_enable in modules/system/system.admin.inc
Menu callback; Enables a theme.
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.

File

includes/common.inc, line 726
Common functions that many Drupal modules will need to reference.

Code

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