Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function attempt(string $username,string $password) |
||
28 | { |
||
29 | $user = UserDataAccess::getUserLoginField($username)->first(); |
||
30 | |||
31 | if (!$user) { |
||
32 | return false; |
||
33 | } |
||
34 | if (password_verify($password,$user->password)) { |
||
|
|||
35 | $_SESSION['user'] = $user->id; |
||
36 | return true; |
||
37 | } |
||
38 | return false; |
||
39 | } |
||
46 | } |
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.