diff --git a/WEB/Controller/PartieGateway.php b/WEB/Controller/PartieGateway.php
index 0e983213..1230cc56 100644
--- a/WEB/Controller/PartieGateway.php
+++ b/WEB/Controller/PartieGateway.php
@@ -66,7 +66,8 @@ class PartieGateway
$query = "SELECT p.id
FROM Partie p, Participer pa
WHERE pa.etat=0
- AND pa.partie=p.id";
+ AND pa.partie=p.id
+ LIMIT 1";
$this->con->executeQuery($query);
$results = $this->con->getResults();
return $results[0]['id'];
diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php
index 1fbc508b..15f2a79f 100644
--- a/WEB/Controller/UserController.php
+++ b/WEB/Controller/UserController.php
@@ -205,12 +205,10 @@ class UserController
require($rep . $vues['queue']);
$model = new UserModel();
$model->addToQueue();
+ $usergroup = $model->findUserGroup();
echo
- '';
}
+ public function findUserGroup() : int {
+ return $this->partie_gateway->findPartieInQueue();
+ }
+
public function launchGame()
{
$this->utilisateur_gateway->launchGame($_SESSION['utilisateur']);
diff --git a/WEB/View/src/pages/Multijoueur/Partie.php b/WEB/View/src/pages/Multijoueur/Partie.php
index aa9cf90e..0e3d7ae1 100644
--- a/WEB/View/src/pages/Multijoueur/Partie.php
+++ b/WEB/View/src/pages/Multijoueur/Partie.php
@@ -3,5 +3,6 @@
+vous ĂȘtes dans la partie