xref: /dokuwiki/inc/Action/Register.php (revision ab583a1bc44ef1ef3b917647fc361aabd055c2ac)
1f21dad39SAndreas Gohr<?php
2f21dad39SAndreas Gohr
3f21dad39SAndreas Gohrnamespace dokuwiki\Action;
4f21dad39SAndreas Gohr
5f21dad39SAndreas Gohruse dokuwiki\Action\Exception\ActionAbort;
6f21dad39SAndreas Gohr
7*ab583a1bSAndreas Gohr/**
8*ab583a1bSAndreas Gohr * Class Register
9*ab583a1bSAndreas Gohr *
10*ab583a1bSAndreas Gohr * Self registering a new user
11*ab583a1bSAndreas Gohr *
12*ab583a1bSAndreas Gohr * @package dokuwiki\Action
13*ab583a1bSAndreas Gohr */
14f21dad39SAndreas Gohrclass Register extends AbstractAction {
15f21dad39SAndreas Gohr
16f21dad39SAndreas Gohr    /** @inheritdoc */
17f21dad39SAndreas Gohr    function minimumPermission() {
18f21dad39SAndreas Gohr        return AUTH_NONE;
19f21dad39SAndreas Gohr    }
20f21dad39SAndreas Gohr
21*ab583a1bSAndreas 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
28*ab583a1bSAndreas Gohr    /** @inheritdoc */
29f21dad39SAndreas Gohr    public function tplContent() {
30f21dad39SAndreas Gohr        html_register();
31f21dad39SAndreas Gohr    }
32f21dad39SAndreas Gohr
33f21dad39SAndreas Gohr}
34