xref: /dokuwiki/inc/Action/ProfileDelete.php (revision 33551e4e8afda1dac6a23128582342522a34931e)
1*33551e4eSAndreas Gohr<?php
2*33551e4eSAndreas Gohr
3*33551e4eSAndreas Gohrnamespace dokuwiki\Action;
4*33551e4eSAndreas Gohr
5*33551e4eSAndreas Gohruse dokuwiki\Action\Exception\ActionAbort;
6*33551e4eSAndreas Gohr
7*33551e4eSAndreas Gohr/**
8*33551e4eSAndreas Gohr * Class ProfileDelete
9*33551e4eSAndreas Gohr *
10*33551e4eSAndreas Gohr * Delete a user account
11*33551e4eSAndreas Gohr *
12*33551e4eSAndreas Gohr * @package dokuwiki\Action
13*33551e4eSAndreas Gohr */
14*33551e4eSAndreas Gohrclass ProfileDelete extends AbstractUserAction {
15*33551e4eSAndreas Gohr
16*33551e4eSAndreas Gohr    /** @inheritdoc */
17*33551e4eSAndreas Gohr    function minimumPermission() {
18*33551e4eSAndreas Gohr        return AUTH_NONE;
19*33551e4eSAndreas Gohr    }
20*33551e4eSAndreas Gohr
21*33551e4eSAndreas Gohr    /** @inheritdoc */
22*33551e4eSAndreas Gohr    public function preProcess() {
23*33551e4eSAndreas Gohr        global $lang;
24*33551e4eSAndreas Gohr        if(auth_deleteprofile()) {
25*33551e4eSAndreas Gohr            msg($lang['profdeleted'], 1);
26*33551e4eSAndreas Gohr            throw new ActionAbort('show');
27*33551e4eSAndreas Gohr        } else {
28*33551e4eSAndreas Gohr            throw new ActionAbort('profile');
29*33551e4eSAndreas Gohr        }
30*33551e4eSAndreas Gohr    }
31*33551e4eSAndreas Gohr
32*33551e4eSAndreas Gohr}
33