ErrorPageController.php in farmOS 2.x
File
modules/core/ui/user/src/Controller/ErrorPageController.php
View source
<?php
namespace Drupal\farm_ui_user\Controller;
use Drupal\system\Controller\Http4xxController;
class ErrorPageController extends Http4xxController {
public function on403() {
$output = parent::on403();
if (!\Drupal::currentUser()
->isAnonymous()) {
return $output;
}
$block = $this
->entityTypeManager()
->getStorage('block')
->load('userlogin');
$output['form'] = $this
->entityTypeManager()
->getViewBuilder('block')
->view($block);
return $output;
}
}