IndexController::actionAccept()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace humhub\modules\privacybox\controllers;
4
5
use Yii;
6
use humhub\components\Controller;
7
8
class IndexController extends Controller
9
{
10
11
    /**
12
     * Configuration Action for Super Admins
13
     */
14
    public function actionAccept()
15
    {
16
        $settings = Yii::$app->getModule('privacybox')->settings;
17
        $settings->user()->set('timestamp', $settings->get('timestamp'));
18
        Yii::$app->response->format = 'json';
19
        return ['success' => true];
20
    }
21
22
    public function actionDecline()
23
    {
24
        return $this->redirect(['/user/auth/logout']);
25
    }
26
27
}
28
29
?>
30