diff --git a/database/DataBaseConnector.php b/database/DataBaseConnector.php index 36b70b9..393a9ba 100644 --- a/database/DataBaseConnector.php +++ b/database/DataBaseConnector.php @@ -504,7 +504,7 @@ codeGenerer cg ON cg.id=na.codeGenerer_id INNER JOIN networks ne ON ne.id=na.net * @return array|bool|mysqli_result|null */ private function getUserByPhoneAndPassword($phone, $password, $table) { - $result = mysqli_query($this->con,"SELECT usr.active,usr.salt,usr.encrypted_password,usr.firstname,usr.lastname,usr.id,usr.phone,usr.email,usr.solde,usr.validation_code,usr.active,usr.network_id,ne.name as network,ne.country_id,ct.name as country,ct.code_dial,ct.code_country FROM $table usr INNER JOIN networks ne ON usr.network_id=ne.id INNER JOIN countries ct ON ct.id=ne.country_id WHERE phone = '$phone'") or die(mysqli_error($this->con)); + $result = mysqli_query($this->con,"SELECT usr.*,ne.name as network,ne.country_id,ct.name as country,ct.code_dial,ct.code_country FROM $table usr INNER JOIN networks ne ON usr.network_id=ne.id INNER JOIN countries ct ON ct.id=ne.country_id WHERE phone = '$phone'") or die(mysqli_error($this->con)); // check for result $no_of_rows = mysqli_num_rows($result); if ($no_of_rows > 0) {