diff --git a/src/Auth/Action/LoginAttemptAction.php b/src/Auth/Action/LoginAttemptAction.php index 751990a..1b7ed5b 100644 --- a/src/Auth/Action/LoginAttemptAction.php +++ b/src/Auth/Action/LoginAttemptAction.php @@ -53,8 +53,9 @@ class LoginAttemptAction if(!isset($_SESSION)) { session_start(); } - $nom_user = $_SESSION['user'] = $params['username']; - $path = $this->session->get('auth.redirect') ?? $this->router->generateUri('gmarche.index'); + $nom_user = $params['username']; + $_SESSION['user'] = $params['username']; + $path = $this->session->get('auth.redirect') ?: $this->router->generateUri('gmarche.index'); $this->session->delete('auth.redirect'); return new RedirectResponse($path); } else {