xref: /dokuwiki/inc/Action/Login.php (revision 73022918a947abda7eee4d7d2302ffd28fdb78e0)
164ab5140SAndreas Gohr<?php
264ab5140SAndreas Gohr
364ab5140SAndreas Gohrnamespace dokuwiki\Action;
464ab5140SAndreas Gohr
564ab5140SAndreas Gohruse dokuwiki\Action\Exception\ActionException;
69cf9796dSSatoshi Saharause dokuwiki\Ui;
764ab5140SAndreas Gohr
8ab583a1bSAndreas Gohr/**
9ab583a1bSAndreas Gohr * Class Login
10ab583a1bSAndreas Gohr *
11ab583a1bSAndreas Gohr * The login form. Actual logins are handled in inc/auth.php
12ab583a1bSAndreas Gohr *
13ab583a1bSAndreas Gohr * @package dokuwiki\Action
14ab583a1bSAndreas Gohr */
159cf9796dSSatoshi Saharaclass Login extends AbstractAclAction
169cf9796dSSatoshi Sahara{
1764ab5140SAndreas Gohr    /** @inheritdoc */
189cf9796dSSatoshi Sahara    public function minimumPermission()
199cf9796dSSatoshi Sahara    {
2064ab5140SAndreas Gohr        return AUTH_NONE;
2164ab5140SAndreas Gohr    }
2264ab5140SAndreas Gohr
2364ab5140SAndreas Gohr    /** @inheritdoc */
249cf9796dSSatoshi Sahara    public function checkPreconditions()
259cf9796dSSatoshi Sahara    {
2664ab5140SAndreas Gohr        global $INPUT;
27b2c9cd19SAndreas Gohr        parent::checkPreconditions();
2864ab5140SAndreas Gohr        if ($INPUT->server->has('REMOTE_USER')) {
2964ab5140SAndreas Gohr            // nothing to do
3064ab5140SAndreas Gohr            throw new ActionException();
3164ab5140SAndreas Gohr        }
3264ab5140SAndreas Gohr    }
3364ab5140SAndreas Gohr
3464ab5140SAndreas Gohr    /** @inheritdoc */
359cf9796dSSatoshi Sahara    public function tplContent()
369cf9796dSSatoshi Sahara    {
37*73022918SAndreas Gohr        (new Ui\Login())->show();
3864ab5140SAndreas Gohr    }
3964ab5140SAndreas Gohr}
40