diff --git a/Vues/accueil.php b/Vues/accueil.php
index 8aff60c..d82033d 100644
--- a/Vues/accueil.php
+++ b/Vues/accueil.php
@@ -15,10 +15,23 @@
diff --git a/config/config.php b/config/config.php
index a390b74..1dabf1d 100644
--- a/config/config.php
+++ b/config/config.php
@@ -2,9 +2,9 @@
$rep = __DIR__ . '/../';
-$login="thchazot1";
-$password="achanger";
-$dsn="mysql:host=localhost;dbname=dbthchazot1"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
+$login="root";
+$password="root";
+$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
//$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite";
/*
$login="thchazot1";
diff --git a/gateway/ListeGateway.php b/gateway/ListeGateway.php
index 35d0b96..79a7c00 100644
--- a/gateway/ListeGateway.php
+++ b/gateway/ListeGateway.php
@@ -68,7 +68,7 @@ class ListeGateway
}
- public function getPublicLists():array{
+ public function getPublicList():array{
$listes = [];
$taches = array();
try {
@@ -101,6 +101,8 @@ class ListeGateway
}
return $listes;
}
+
+
}
?>
\ No newline at end of file
diff --git a/gateway/UserGateway.php b/gateway/UserGateway.php
index 2ff6089..4624648 100644
--- a/gateway/UserGateway.php
+++ b/gateway/UserGateway.php
@@ -38,7 +38,7 @@ class UserGateway
$query = "SELECT * FROM Utilisateur WHERE username=:username";
$this->con->executeQuery($query, array(':username' => array($username, PDO::PARAM_STR)));
$results=$this->con->getResults();
- return $results;
+ return $results[0];
}
public function getLastId(): array{
diff --git a/modeles/MdlListe.php b/modeles/MdlListe.php
index a413283..9e9498b 100644
--- a/modeles/MdlListe.php
+++ b/modeles/MdlListe.php
@@ -55,11 +55,14 @@ class MdlListe{
return $tabListe;
}
- public function findByUser(User $u): array{
+ public function findByUser(string $username): array{
$gate=new ListeGateway($this->con);
$gateTache=new TacheGateway($this->con);
+ $gateUser=new TacheGateway($this->con);
- $results=$gate->findByUserId($u->getId());
+ $id=$gateUser->findByName($username);
+ $id=$id['id'];
+ $results=$gate->findByUserId($id);
$tabListe=[];
foreach ($results as $row ) {
$tabTache=[];