Login.php 731 B

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