drupal_access_denied

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 drupal_access_denied()

Generates a 403 error if the request is not allowed.

▾ 9 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.
comment_edit in modules/comment/comment.pages.inc
Form builder; generate a comment editing form.
file_download in includes/file.inc
Menu handler for private file transfers.
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.
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 386

<?php
function drupal_access_denied() {
  drupal_set_header('403 Forbidden');

  watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);

  $path = drupal_get_normal_path(variable_get('site_403', ''));
  if ($path && $path != $_GET['q']) {
    // Custom 403 handler. Set the active item in case there are tabs to
    // display or other dependencies on the path.
    menu_set_active_item($path);
    $return = menu_execute_active_handler($path);
  }

  if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
    // Standard 403 handler.
    drupal_set_title(t('Access denied'));
    $return = t('You are not authorized to access this page.');
  }

  print drupal_render_page($return);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen