| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function indexAction() |
||
| 31 | { |
||
| 32 | $id = $this->getParam('id'); |
||
| 33 | /** @var UserService $userSvc */ |
||
| 34 | $userSvc = ContainerService::getInstance()->getContainer()['service.user']; |
||
| 35 | /** @var User $user */ |
||
| 36 | $user = $userSvc->findUserById($id); |
||
| 37 | if (!$user) { |
||
| 38 | $this->sendJsonResponse(['User not found']); |
||
| 39 | } |
||
| 40 | $this->sendJsonResponse(['email' => $user->getEmail()]); |
||
| 41 | } |
||
| 42 | |||
| 58 |