| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function postLoginAction() |
||
| 33 | { |
||
| 34 | if (true === $this->get('auth')->login( |
||
| 35 | $this->getFromRequest('post', 'username'), |
||
| 36 | $this->getFromRequest('post', 'password') |
||
| 37 | )) { |
||
| 38 | $this->setMessage('success', 'Zalogowano pomyślnie!'); |
||
| 39 | $this->redirect('/admin'); |
||
| 40 | |||
| 41 | $this->terminate(); |
||
| 42 | } |
||
| 43 | |||
| 44 | $this->setMessage('warning', 'Złe hasło!'); |
||
| 45 | $this->redirect('/admin/login'); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |