Fix use of old db

This commit is contained in:
osaajani 2019-11-04 18:23:11 +01:00
parent 628527c70f
commit 46ebd39c04
6 changed files with 54 additions and 48 deletions

View file

@ -62,7 +62,6 @@ namespace controllers\publics;
$_SESSION['connect'] = true;
$_SESSION['user'] = $user;
$_SESSION['csrf'] = str_shuffle(uniqid().uniqid());
return $this->redirect(\descartes\Router::url('Dashboard', 'show'));
}
@ -88,9 +87,7 @@ namespace controllers\publics;
if (!$this->verify_csrf($csrf))
{
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
$this->redirect(\descartes\Router::url('Connect', 'forget_password'));
return false;
return $this->redirect(\descartes\Router::url('Connect', 'forget_password'));
}
$email = $_POST['email'] ?? false;
@ -99,9 +96,7 @@ namespace controllers\publics;
if (!$email || !$user)
{
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Aucun utilisateur n\'existe pour cette adresse mail.');
$this->redirect(\descartes\Router::url('Connect', 'forget_password'));
return false;
return $this->redirect(\descartes\Router::url('Connect', 'forget_password'));
}
$Tokenista = new \Ingenerator\Tokenista(APP_SECRET);
@ -149,6 +144,6 @@ namespace controllers\publics;
{
session_unset();
session_destroy();
$this->redirect(\descartes\Router::url('Connect', 'login'));
return $this->redirect(\descartes\Router::url('Connect', 'login'));
}
}