Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Http4xxController.php

function Http4xxController::on401

The default 401 content.

Return value

array A render array containing the message to display for 401 pages.

File

core/modules/system/src/Controller/Http4xxController.php, line 30

Class

Http4xxController
Controller for default HTTP 4xx responses.

Namespace

Drupal\system\Controller

Code

public function on401() {
    return [
        '#markup' => $this->t('Log in to access this page.'),
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal