From 58d4eaa1b85b4a988f209cea579a202d4d11b111 Mon Sep 17 00:00:00 2001 From: Alexis Feron Date: Thu, 2 Nov 2023 11:30:16 +0100 Subject: [PATCH] Ajout metier --- php/dal/gateway/AlumniGateway.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/php/dal/gateway/AlumniGateway.php b/php/dal/gateway/AlumniGateway.php index 122418f..d80ff7e 100644 --- a/php/dal/gateway/AlumniGateway.php +++ b/php/dal/gateway/AlumniGateway.php @@ -58,7 +58,7 @@ class AlumniGateway ':i' => array($id, PDO::PARAM_INT) )); $res=$this->con->getResults(); - return new Alumni($res[0]['email'],$res[0]['id'],$res[0]['motDePasse'],$res[0]['role']); + return new Alumni($res[0]['mail'],$res[0]['id'],$res[0]['mdp'],$res[0]['role']); } public function findByEmail(string $email){ @@ -67,7 +67,7 @@ class AlumniGateway ':e' => array($email, PDO::PARAM_STR), )); $res=$this->con->getResults(); - return new Alumni($res[0]['email'],$res[0]['id'],$res[0]['motDePasse'],$res[0]['role']); + return new Alumni($res[0]['mail'],$res[0]['id'],$res[0]['mdp'],$res[0]['role']); } public function getAll(){ @@ -76,7 +76,7 @@ class AlumniGateway $res=$this->con->getResults(); $array=[]; foreach($res as $r){ - $array[]=new Alumni($r['email'],$r['id'],$r['motDePasse'],$r['role']); + $array[]=new Alumni($r['mail'],$r['id'],$r['mdp'],$r['role']); } return $array; }