Correction redirection suite login depuis url /login

This commit is contained in:
nox 2019-12-09 16:06:21 +01:00
parent 2f0b22e26e
commit af2257b796
1 changed files with 1 additions and 2 deletions

View File

@ -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 {