query("SELECT `id`, `pwd_hash`, `email`, `surname`, `first_name`, `role`, `team_id` FROM `users` WHERE `email` = '" . $email . "';"); if (($data = $result->fetch()) === FALSE) return "Le compte n'existe pas."; if (!password_verify($password, $data["pwd_hash"])) return "Le mot de passe est incorrect."; $_SESSION["user_id"] = $data["id"]; $_SESSION["email"] = $data["email"]; $_SESSION["surname"] = $data["surname"]; $_SESSION["first_name"] = $data["first_name"]; $_SESSION["role"] = $data["role"]; $_SESSION["team_id"] = $data["team_id"]; $response = $DB->query("SELECT `tournament`, `validation_status` FROM `teams` WHERE `id` ='" . $_SESSION["team_id"] . "' AND `year` = '$YEAR';"); $data = $response->fetch(); $_SESSION["tournament_id"] = $data["tournament"]; $_SESSION["team_validation_status"] = $data["validation_status"]; return false; } ?> Erreur : " . $error_message . ""; ?> Connexion réussie !