[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Action/ -> Login.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Action;
   4  
   5  use dokuwiki\Action\Exception\ActionException;
   6  use dokuwiki\Ui;
   7  
   8  /**
   9   * Class Login
  10   *
  11   * The login form. Actual logins are handled in inc/auth.php
  12   *
  13   * @package dokuwiki\Action
  14   */
  15  class Login extends AbstractAclAction
  16  {
  17      /** @inheritdoc */
  18      public function minimumPermission()
  19      {
  20          return AUTH_NONE;
  21      }
  22  
  23      /** @inheritdoc */
  24      public function checkPreconditions()
  25      {
  26          global $INPUT;
  27          parent::checkPreconditions();
  28          if ($INPUT->server->has('REMOTE_USER')) {
  29              // nothing to do
  30              throw new ActionException();
  31          }
  32      }
  33  
  34      /** @inheritdoc */
  35      public function tplContent()
  36      {
  37          (new Ui\Login())->show();
  38      }
  39  }