Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Lines | 11 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
66 | View Code Duplication | public function validateEmailInDb($email) |
|
67 | { |
||
68 | $query = "SELECT login_id FROM login WHERE email = '$email'"; |
||
69 | if ($result = $this->connect->query($query)) { |
||
70 | if ($result->num_rows > 0) { |
||
71 | return 1; |
||
72 | } else { |
||
73 | return 0; |
||
74 | } |
||
75 | } |
||
76 | } |
||
77 | |||
97 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.