Correction connexion user pour url /login

This commit is contained in:
nox 2019-12-09 16:02:52 +01:00
parent d915fd4c64
commit 2b881fd7c5
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ class LoginAttemptAction
if(!isset($_SESSION)) { if(!isset($_SESSION)) {
session_start(); session_start();
} }
$nom_user = $_SESSION['user'] = $params['username']; $nom_user = $params['username'];
$path = $this->session->get('auth.redirect') ?? $this->router->generateUri('gmarche.index'); $_SESSION['user'] = $params['username'];
$path = $this->session->get('auth.redirect') ?: $this->router->generateUri('gmarche.index');
$this->session->delete('auth.redirect'); $this->session->delete('auth.redirect');
return new RedirectResponse($path); return new RedirectResponse($path);
} else { } else {