Completed
Push — actionrefactor ( 6e4bf0 )
by Andreas
04:36
created

Profile::preProcess()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Action;
4
5
use dokuwiki\Action\Exception\ActionAbort;
6
7
/**
8
 * Class Profile
9
 *
10
 * Handle the profile form
11
 *
12
 * @package dokuwiki\Action
13
 */
14
class Profile extends AbstractUserAction {
15
16
    /** @inheritdoc */
17
    function minimumPermission() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
18
        return AUTH_NONE;
19
    }
20
21
    /** @inheritdoc */
22
    public function preProcess() {
23
        global $lang;
24
        if(updateprofile()) {
25
            msg($lang['profchanged'], 1);
26
            throw new ActionAbort('show');
27
        }
28
    }
29
30
    /** @inheritdoc */
31
    public function tplContent() {
32
        html_updateprofile();
33
    }
34
35
}
36