Compare commits

...

2 Commits

Author SHA1 Message Date
c056e0bdfc
Merge pull request 'fix redirect again - hopefully last time' (!9) from bugfix/fix-redirects-again into master
All checks were successful
rvr-nextgen/pipeline/head This commit looks good
Reviewed-on: #9
2023-04-08 21:11:31 +02:00
12890293e0
fix redirect again - hopefully last time
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
2023-04-08 20:54:18 +02:00
2 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ if ($match !== null) {
} }
if (!$authorized) { if (!$authorized) {
Container::$request->session()->set('redirect_after_login', '/' . $url); Container::$request->session()->set('redirect_after_login', $url);
$response = new Redirect(Container::$routeCollection->getRoute('login')->generateLink(), IRedirect::TEMPORARY); $response = new Redirect(Container::$routeCollection->getRoute('login')->generateLink(), IRedirect::TEMPORARY);
header('Location: ' . $response->getUrl(), true, $response->getHttpCode()); header('Location: ' . $response->getUrl(), true, $response->getHttpCode());
return; return;

View File

@ -47,7 +47,7 @@ class LoginController
return new Redirect($this->redirectUrl, IRedirect::TEMPORARY); return new Redirect($this->redirectUrl, IRedirect::TEMPORARY);
} }
return new HtmlContent('login/login', ['redirectUrl' => $this->redirectUrl]); return new HtmlContent('login/login', ['redirectUrl' => '/' . $this->redirectUrl]);
} }
public function getGoogleLoginRedirect(): IRedirect public function getGoogleLoginRedirect(): IRedirect
@ -99,7 +99,7 @@ class LoginController
$user = $this->userRepository->getById($resetter->getUserId()); $user = $this->userRepository->getById($resetter->getUserId());
return new HtmlContent('login/reset_password', ['success' => true, 'token' => $token, 'email' => $user->getEmail(), 'redirectUrl' => $this->redirectUrl]); return new HtmlContent('login/reset_password', ['success' => true, 'token' => $token, 'email' => $user->getEmail(), 'redirectUrl' => '/' . $this->redirectUrl]);
} }
public function login(): IContent public function login(): IContent
@ -183,7 +183,7 @@ class LoginController
$this->deleteRedirectUrl(); $this->deleteRedirectUrl();
return new JsonContent([ return new JsonContent([
'redirect' => [ 'redirect' => [
'target' => $this->redirectUrl 'target' => '/' . $this->redirectUrl
] ]
]); ]);
} }
@ -247,7 +247,7 @@ class LoginController
$this->deleteRedirectUrl(); $this->deleteRedirectUrl();
return new JsonContent([ return new JsonContent([
'redirect' => [ 'redirect' => [
'target' => $this->redirectUrl 'target' => '/' . $this->redirectUrl
] ]
]); ]);
} }