| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function isLogged(): bool |
||
| 38 | { |
||
| 39 | if (!isset($this->request['session']['ga_cookie'])) { |
||
| 40 | return false; |
||
| 41 | } |
||
| 42 | |||
| 43 | foreach ($this->users as $user) { |
||
| 44 | if ($this->request['session']['egzaminer_auth_un'] === $user['login'] |
||
| 45 | && password_verify($user['login'], $this->request['session']['ga_cookie'])) { |
||
| 46 | return true; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | return false; |
||
| 51 | } |
||
| 52 | |||
| 61 |