xref: /dokuwiki/inc/Action/Login.php (revision b2c9cd19ff3733a632c8d415256d3096765343f7)
164ab5140SAndreas Gohr<?php
264ab5140SAndreas Gohr
364ab5140SAndreas Gohrnamespace dokuwiki\Action;
464ab5140SAndreas Gohr
564ab5140SAndreas Gohruse dokuwiki\Action\Exception\ActionException;
664ab5140SAndreas Gohr
7ab583a1bSAndreas Gohr/**
8ab583a1bSAndreas Gohr * Class Login
9ab583a1bSAndreas Gohr *
10ab583a1bSAndreas Gohr * The login form. Actual logins are handled in inc/auth.php
11ab583a1bSAndreas Gohr *
12ab583a1bSAndreas Gohr * @package dokuwiki\Action
13ab583a1bSAndreas Gohr */
1464ab5140SAndreas Gohrclass Login extends AbstractAclAction {
1564ab5140SAndreas Gohr
1664ab5140SAndreas Gohr    /** @inheritdoc */
17ec701221SAndreas Gohr    public function minimumPermission() {
1864ab5140SAndreas Gohr        return AUTH_NONE;
1964ab5140SAndreas Gohr    }
2064ab5140SAndreas Gohr
2164ab5140SAndreas Gohr    /** @inheritdoc */
22*b2c9cd19SAndreas Gohr    public function checkPreconditions() {
2364ab5140SAndreas Gohr        global $INPUT;
24*b2c9cd19SAndreas Gohr        parent::checkPreconditions();
2564ab5140SAndreas Gohr        if($INPUT->server->has('REMOTE_USER')) {
2664ab5140SAndreas Gohr            // nothing to do
2764ab5140SAndreas Gohr            throw new ActionException();
2864ab5140SAndreas Gohr        }
2964ab5140SAndreas Gohr    }
3064ab5140SAndreas Gohr
3164ab5140SAndreas Gohr    /** @inheritdoc */
3264ab5140SAndreas Gohr    public function tplContent() {
3364ab5140SAndreas Gohr        html_login();
3464ab5140SAndreas Gohr    }
3564ab5140SAndreas Gohr
3664ab5140SAndreas Gohr}
37