| Conditions | 3 |
| Paths | 3 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 36 | public function indexAction() |
||
| 37 | { |
||
| 38 | /* @var \Auth\AuthenticationService $auth */ |
||
| 39 | $auth = $this->serviceLocator->get('AuthenticationService'); |
||
| 40 | $user = $auth->getUser(); |
||
| 41 | $error = false; |
||
| 42 | |||
| 43 | if ($this->params()->fromPost('confirm')) |
||
| 44 | { |
||
| 45 | if ($this->dependencies->removeItems($user)) { |
||
| 46 | $auth->clearIdentity(); |
||
| 47 | $user->setStatus(Status::INACTIVE); |
||
| 48 | return $this->redirect()->toRoute('lang'); |
||
| 49 | } else { |
||
| 50 | $error = true; |
||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 54 | return [ |
||
| 55 | 'lists' => $this->dependencies->getLists(), |
||
| 56 | 'user' => $user, |
||
| 57 | 'limit' => 20, |
||
| 58 | 'error' => $error, |
||
| 59 | ]; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |