|
|
|
@ -20,11 +20,10 @@ class VisitorController {
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "signIn":
|
|
|
|
|
$this->Connexion($login, $mdp);
|
|
|
|
|
$this->Connection($vues_erreur);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "signUp":
|
|
|
|
|
$this->Inscription($login, $mdp);
|
|
|
|
|
$this->Inscription($vues_erreur);
|
|
|
|
|
break;
|
|
|
|
|
case "accessSignIn":
|
|
|
|
|
require($rep.$vues['signIn']);
|
|
|
|
@ -72,17 +71,16 @@ class VisitorController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function Connexion(array $vues_erreur){
|
|
|
|
|
public function Connection(array $vues_erreur){
|
|
|
|
|
global $rep,$vues,$dataView;
|
|
|
|
|
$username=$_POST['login'];
|
|
|
|
|
$password=$_POST['mdp'];
|
|
|
|
|
$username=$_POST['username'];
|
|
|
|
|
$password=$_POST['password'];
|
|
|
|
|
$vues_erreur=Validation::val_connexion($username,$password,$vues_erreur);
|
|
|
|
|
if(!empty($vues_erreur)){
|
|
|
|
|
require($rep.$vues['signIn']);
|
|
|
|
|
}
|
|
|
|
|
$model= new MdlUser();
|
|
|
|
|
if($model->existUser($username)){
|
|
|
|
|
echo "aaaaaaaaaaggehdhhdhdhdhdhdhcfhgezshfiueshfiuehiufhsiufheiushfiuhf";
|
|
|
|
|
if(password_verify($password,$model->getPasswordHash($username))){
|
|
|
|
|
$model->connexion($username);
|
|
|
|
|
$_REQUEST['action']=null;
|
|
|
|
|