| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 5 |
| Ratio | 38.46 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | public function postChangePassword($request, $response) |
||
| 15 | { |
||
| 16 | View Code Duplication | if ($this->validator->validatePasswordChangeForm($request)->getErrorsCount() > 0) { |
|
| 17 | $_SESSION['errors'] = $this->validator->getErrors(); |
||
| 18 | return $response->withRedirect($this->router->pathFor('auth.password.change')); |
||
| 19 | } |
||
| 20 | |||
| 21 | $this->auth->user()->setPassword($request->getParam('password1')); |
||
| 22 | |||
| 23 | $this->flash->addMessage('success', 'Hasło zostało zmienione'); |
||
| 24 | |||
| 25 | return $response->withRedirect($this->router->pathFor('auth.password.change')); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |