src/Controllers/Auth/PasswordController.php 1 location
|
@@ 16-20 (lines=5) @@
|
| 13 |
|
|
| 14 |
|
public function postChangePassword($request, $response) |
| 15 |
|
{ |
| 16 |
|
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'); |
src/Controllers/Auth/AuthController.php 1 location
|
@@ 49-53 (lines=5) @@
|
| 46 |
|
|
| 47 |
|
public function postSignIn($request, $response) |
| 48 |
|
{ |
| 49 |
|
if ($this->validator->validateLoginForm($request)->getErrorsCount() > 0) { |
| 50 |
|
$_SESSION['errors'] = $this->validator->getErrors(); |
| 51 |
|
return $response->withRedirect($this->router->pathFor('auth.signin')); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
$auth = $this->auth->attempt( |
| 55 |
|
$request->getParam('email'), |
| 56 |
|
$request->getParam('password') |