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 {