|
|
|
@ -21,11 +21,7 @@ class UtilisateurModele
|
|
|
|
|
|
|
|
|
|
public function connection(string $email, string $mdp) : ? \App\metier\Alumni
|
|
|
|
|
{
|
|
|
|
|
$dsn = "mysql:host=localhost;dbname=dbAlica";
|
|
|
|
|
$username = "Dev";
|
|
|
|
|
$password = "Dev";
|
|
|
|
|
|
|
|
|
|
$con = new \App\gateway\Connection($dsn, $username, $password);
|
|
|
|
|
$con = new \App\gateway\Connection(DB_HOST,DB_USER,DB_PASS);
|
|
|
|
|
$gate = new \App\gateway\AlumniGateway($con);
|
|
|
|
|
// Récupérez l'utilisateur avec l'email donné en utilisant AlumniGateway
|
|
|
|
|
$utilisateur = $gate->findByEmail($email);
|
|
|
|
@ -55,12 +51,8 @@ class UtilisateurModele
|
|
|
|
|
|
|
|
|
|
public function inscription(string $prenom, string $nom,string $email, string $hashpassword):? \App\metier\Alumni
|
|
|
|
|
{
|
|
|
|
|
$dsn = "mysql:host=localhost;dbname=dbAlica";
|
|
|
|
|
$username = "test";
|
|
|
|
|
$password = "test";
|
|
|
|
|
|
|
|
|
|
$role = "Membre";
|
|
|
|
|
$con = new \App\gateway\Connection($dsn, $username, $password);
|
|
|
|
|
$con = new \App\gateway\Connection(DB_HOST,DB_USER,DB_PASS);
|
|
|
|
|
$gate = new \App\gateway\AlumniGateway($con);
|
|
|
|
|
$profilGate = new \App\gateway\ProfilGateway($con);
|
|
|
|
|
// Insérez le nouvel utilisateur dans la base de données en utilisant AlumniGateway
|
|
|
|
@ -88,11 +80,7 @@ class UtilisateurModele
|
|
|
|
|
|
|
|
|
|
public function getUtilisateurByEmail(string $email)
|
|
|
|
|
{
|
|
|
|
|
$dsn = "mysql:host=localhost;dbname=dbAlica";
|
|
|
|
|
$username = "Dev";
|
|
|
|
|
$password = "Dev";
|
|
|
|
|
|
|
|
|
|
$con = new \App\gateway\Connection($dsn, $username, $password);
|
|
|
|
|
$con = new \App\gateway\Connection(DB_HOST,DB_USER,DB_PASS);
|
|
|
|
|
$gate = new \App\gateway\AlumniGateway($con);
|
|
|
|
|
// Récupérez l'utilisateur avec l'email donné en utilisant AlumniGateway
|
|
|
|
|
$utilisateur = $gate->findByEmail($email);
|
|
|
|
|