Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
45 | public function actionLogout() |
||
46 | { |
||
47 | // check if user authorized |
||
48 | if (!App::$User->isAuth()) { |
||
49 | throw new ForbiddenException(__('You are not authorized user')); |
||
50 | } |
||
51 | |||
52 | // unset session data |
||
53 | App::$Session->invalidate(); |
||
54 | |||
55 | // redirect to main |
||
56 | $this->response->redirect('/'); |
||
57 | } |
||
59 |