xref: /dokuwiki/inc/Action/Register.php (revision ec7012214a693c8b3103377245a7d797cf8f9608)
1f21dad39SAndreas Gohr<?php
2f21dad39SAndreas Gohr
3f21dad39SAndreas Gohrnamespace dokuwiki\Action;
4f21dad39SAndreas Gohr
5f21dad39SAndreas Gohruse dokuwiki\Action\Exception\ActionAbort;
6f21dad39SAndreas Gohr
7ab583a1bSAndreas Gohr/**
8ab583a1bSAndreas Gohr * Class Register
9ab583a1bSAndreas Gohr *
10ab583a1bSAndreas Gohr * Self registering a new user
11ab583a1bSAndreas Gohr *
12ab583a1bSAndreas Gohr * @package dokuwiki\Action
13ab583a1bSAndreas Gohr */
14f21dad39SAndreas Gohrclass Register extends AbstractAction {
15f21dad39SAndreas Gohr
16f21dad39SAndreas Gohr    /** @inheritdoc */
17*ec701221SAndreas Gohr    public function minimumPermission() {
18f21dad39SAndreas Gohr        return AUTH_NONE;
19f21dad39SAndreas Gohr    }
20f21dad39SAndreas Gohr
21ab583a1bSAndreas Gohr    /** @inheritdoc */
22f21dad39SAndreas Gohr    public function preProcess() {
23f21dad39SAndreas Gohr        if(register()) { // FIXME could be moved from auth to here
24f21dad39SAndreas Gohr            throw new ActionAbort('login');
25f21dad39SAndreas Gohr        }
26f21dad39SAndreas Gohr    }
27f21dad39SAndreas Gohr
28ab583a1bSAndreas Gohr    /** @inheritdoc */
29f21dad39SAndreas Gohr    public function tplContent() {
30f21dad39SAndreas Gohr        html_register();
31f21dad39SAndreas Gohr    }
32f21dad39SAndreas Gohr
33f21dad39SAndreas Gohr}
34