set redirect_after_login in query parameter as well
All checks were successful
soko-web/pipeline/head This commit looks good

This commit is contained in:
Bence Pőcze 2024-10-24 22:15:22 +02:00
parent ecec258a64
commit ee7d9623a3
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -168,7 +168,10 @@ class HttpResponse
private function redirectToLogin(): void
{
$this->request->session()->set('redirect_after_login', $this->rawUrl);
$response = new Redirect($this->routeCollection->getRoute($this->appConfig['loginRouteId'])->generateLink(), IRedirect::TEMPORARY);
$response = new Redirect(
$this->routeCollection->getRoute($this->appConfig['loginRouteId'])
->generateLink(['redirect_after_login' => urlencode($this->rawUrl)]),
IRedirect::TEMPORARY);
header('Location: ' . $this->getRedirectUrl($response), true, $response->getHttpCode());
}