🤖 Rector and PHPCS fixes
[dokuwiki.git] / inc / Action / Denied.php
blob14cbd89538ed1d25982123402400d052664724fa
1 <?php
3 namespace dokuwiki\Action;
5 use dokuwiki\Ui\Login;
6 use dokuwiki\Extension\Event;
7 use dokuwiki\Ui;
9 /**
10 * Class Denied
12 * Show the access denied screen
14 * @package dokuwiki\Action
16 class Denied extends AbstractAction
18 /** @inheritdoc */
19 public function minimumPermission()
21 return AUTH_NONE;
24 /** @inheritdoc */
25 public function tplContent()
27 $this->showBanner();
29 $data = null;
30 $event = new Event('ACTION_DENIED_TPLCONTENT', $data);
31 if ($event->advise_before()) {
32 global $INPUT;
33 if (empty($INPUT->server->str('REMOTE_USER')) && actionOK('login')) {
34 (new Login())->show();
37 $event->advise_after();
40 /**
41 * Display error on denied pages
43 * @author Andreas Gohr <andi@splitbrain.org>
45 * @return void
47 public function showBanner()
49 // print intro
50 echo p_locale_xhtml('denied');