From af2257b796dfeac521854e419319d86ebb6c2374 Mon Sep 17 00:00:00 2001 From: nox Date: Mon, 9 Dec 2019 16:06:21 +0100 Subject: [PATCH] Correction redirection suite login depuis url /login --- src/Auth/Action/LoginAttemptAction.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Auth/Action/LoginAttemptAction.php b/src/Auth/Action/LoginAttemptAction.php index 2d9c433..7b301a7 100644 --- a/src/Auth/Action/LoginAttemptAction.php +++ b/src/Auth/Action/LoginAttemptAction.php @@ -59,8 +59,7 @@ class LoginAttemptAction $_SESSION['role'] = $this->userTable->findRole($params['username']); //$nom_user = $_SESSION['user'] = $params['username']; $_SESSION['user'] = $params['username']; - //$path = $this->router->generateUri('admin'); - $path = $this->session->get('auth.redirect') ?? $this->router->generateUri('gmarche.index'); + $path = $this->session->get('auth.redirect') ?: $this->router->generateUri('gmarche.index'); $this->session->delete('auth.redirect'); return new RedirectResponse($path); } else {