diff --git a/controller/VisitorCtrl.php b/controller/VisitorCtrl.php index 68de0e9..8c3d756 100644 --- a/controller/VisitorCtrl.php +++ b/controller/VisitorCtrl.php @@ -19,7 +19,7 @@ class VisitorCtrl $action = $_REQUEST['action']; else $action = null; - + switch($action){ case null: $this->loadHome(); @@ -99,7 +99,7 @@ class VisitorCtrl } function connection(){ - $this->userModel->connexion($user,$mdp); + $this->userModel->connexion($_POST['username'],$_POST['password']); $this->loadHome(); } @@ -109,7 +109,8 @@ class VisitorCtrl } function register(){ - $this->userModel->ajouter($user,$mdp); + $this->userModel->ajouter($_POST['username'],$_POST['password']); + $this->go_connection(); } function go_list(){ diff --git a/dal/UserGateway.php b/dal/UserGateway.php index 9046375..e9573ed 100644 --- a/dal/UserGateway.php +++ b/dal/UserGateway.php @@ -47,8 +47,8 @@ $query = 'SELECT mdp FROM User WHERE login = :login'; $this->con->executeQuery($query, array(':login'=>array($login, PDO::PARAM_STR))); $result = $this->con->getResults(); - $hash = password_hash($result[0]['mdp'], PASSWORD_BCRYPT, array("cost" => 12)); - if(password_verify($mdp, $hash)) + echo var_dump($result[0][0])."
"; + if(password_verify($mdp, $result[0][0])) return $login; } } diff --git a/view/connection.php b/view/connection.php index 5033d37..e1c61ef 100644 --- a/view/connection.php +++ b/view/connection.php @@ -48,21 +48,22 @@

Welcome back!

-
+
- +
- +
- + +
diff --git a/view/newTask.php b/view/newTask.php index fa2dbf0..3b52f0f 100644 --- a/view/newTask.php +++ b/view/newTask.php @@ -54,6 +54,11 @@ +
+ + +
+
@@ -69,11 +74,6 @@
-
- - -
- diff --git a/view/register.php b/view/register.php index 91f2d71..3849011 100644 --- a/view/register.php +++ b/view/register.php @@ -48,21 +48,22 @@

Make private lists with a personnal account

-
+
- +
- +
- + +