| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function getUser($username) |
||
| 10 | { |
||
| 11 | $stmt = $this->db->prepare($sql = sprintf('SELECT * from %s where username=:username', $this->config['user_table'])); |
||
| 12 | $stmt->execute(['username' => $username]); |
||
| 13 | |||
| 14 | if (!$userInfo = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
||
| 15 | return false; |
||
| 16 | } |
||
| 17 | |||
| 18 | return array_merge([ |
||
| 19 | 'user_id' => $userInfo['id'] |
||
| 20 | ], $userInfo); |
||
| 21 | } |
||
| 33 |