|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|