Ajout des modifications
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Johan LACHENAL 2 years ago
parent 5b6b259b81
commit bcded9a6ae

@ -66,22 +66,13 @@ class UserController
throw(new Exception("Mot de passe non valide")); throw(new Exception("Mot de passe non valide"));
} }
$j = $gateway->getUtilisateurByEmail($_REQUEST['email']); $j = $gateway->getUtilisateurByEmail($_REQUEST['email']);
<<<<<<< HEAD:WEB/Controller/UserController.php
if ($j->getEmail() != "null") {
=======
if ($j != null) { if ($j != null) {
>>>>>>> d82ece50 (Changement de joueur et admin):WEB/Controller/Controller.php
$error = "Email déjà utilisé."; $error = "Email déjà utilisé.";
throw (new Exception("Email déjà utilisé")); throw (new Exception("Email déjà utilisé"));
} }
$password = password_hash($_REQUEST['password'], PASSWORD_DEFAULT); $password = password_hash($_REQUEST['password'], PASSWORD_DEFAULT);
<<<<<<< HEAD:WEB/Controller/UserController.php
$utilisateur = new Utilisateur($_REQUEST['email'], $_REQUEST['username'], $password, false);
$gateway->insert($utilisateur);
=======
$Utilisateur = new Utilisateur($_REQUEST['email'], $_REQUEST['username'], $password); $Utilisateur = new Utilisateur($_REQUEST['email'], $_REQUEST['username'], $password);
$gateway->insert($Utilisateur); $gateway->insert($Utilisateur);
>>>>>>> d82ece50 (Changement de joueur et admin):WEB/Controller/Controller.php
$_SESSION['connected'] = 'true'; $_SESSION['connected'] = 'true';
$_SESSION['role'] = 'utilisateur'; $_SESSION['role'] = 'utilisateur';
require ($rep.$vues['main']); require ($rep.$vues['main']);
@ -98,13 +89,8 @@ class UserController
global $rep, $vues, $sel, $error; global $rep, $vues, $sel, $error;
try { try {
$gateway = new UtilisateurGateway($this->con); $gateway = new UtilisateurGateway($this->con);
<<<<<<< HEAD:WEB/Controller/UserController.php
$utilisateur = $gateway->getUtilisateurByEmail($_REQUEST['email']);
if ($utilisateur->getEmail() == null){
=======
$Utilisateur = $gateway->getUtilisateurByEmail($_REQUEST['email']); $Utilisateur = $gateway->getUtilisateurByEmail($_REQUEST['email']);
if ($Utilisateur->getEmail() == null){ if ($Utilisateur->getEmail() == null){
>>>>>>> d82ece50 (Changement de joueur et admin):WEB/Controller/Controller.php
$error = "Utilisateur non trouvé."; $error = "Utilisateur non trouvé.";
throw new Exception("Utilisateur introuvable"); throw new Exception("Utilisateur introuvable");
} }

Loading…
Cancel
Save