function Http4xxController::on401
Same name in other branches
- 8.9.x core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on401()
- 10 core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on401()
- 11.x core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\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\ControllerCode
public function on401() {
return [
'#markup' => $this->t('Please log in to access this page.'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.