From 2b881fd7c50faa8be9b6f44aae3634d74d31e806 Mon Sep 17 00:00:00 2001 From: nox Date: Mon, 9 Dec 2019 16:02:52 +0100 Subject: [PATCH] Correction connexion user pour url /login --- src/Auth/Action/LoginAttemptAction.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 {