1<?php 2 3namespace dokuwiki\Action; 4 5use dokuwiki\Action\Exception\ActionException; 6use 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 */ 15class 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} 40