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

This commit is contained in:
bence committed 2024-10-24 22:15:22 +02:00
1 parent ecec258a64
commit ee7d9623a3
1 file changed
+4 -1
+4 -1
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());
}