... <form class="md-float-material" method="post" action="index.php"> ...
}else{
...
session_unset();
session_destroy();
// вывод в ajax js
$outAccount = 0;
$out = json_encode(array(
outAccount => $outAccount
));
echo $out;
}
session_start();
if(isset($_POST['outAccount']))
$outAccount = $_POST['outAccount'];
if($outAccount != 1){
require_once'_mysql.php';
$result = new baseConnect();
$email = $_POST['email'];
$userPass = $_POST['pass'];
$datelocal = date('Y-m-d h:i:s');
echo "Вводимый пароль: ".$userPass."<br>";
$checkEmail_aut = $result::connectTables("SELECT `pass` FROM `"._TABLE_STAFF_."` WHERE `email` LIKE '".$email."'");
$passBD = mysqli_fetch_assoc($checkEmail_aut);
if(isset($passBD['pass'])){
echo "Вывод из БД: ".$passBD['pass']."<br>";
if(password_verify($userPass._GARBAGEKEY_, $passBD['pass'])){ // тут не сравнивает хеш
echo "Сравнение хеш: "."<br>".$passBD['pass']."<br>".password_verify($userPass._GARBAGEKEY_, $passBD['pass'])."<br>";
$result::connectTables("UPDATE "._TABLE_STAFF_." SET date_input = '".$datelocal."' WHERE email = '".$email."'");
$_SESSION['email'] = $email;
$_SESSION['password'] = $passBD['pass'];
$result::MySQLClose();
}
}
}else{
session_unset();
session_destroy();
$outAccount = 0;
$out = json_encode(array(
outAccount => $outAccount
));
echo $out;
}