Skip to content

Commit

Permalink
Merge pull request #25142 from nextcloud/fix/login_no_logout_redirect
Browse files Browse the repository at this point in the history
Do not redirect to logout after login
  • Loading branch information
rullzer authored Jan 15, 2021
2 parents bcb52d6 + f57b930 commit d3ab26c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ public function showLoginForm(string $user = null, string $redirect_url = null):
);

if (!empty($redirect_url)) {
$this->initialStateService->provideInitialState('core', 'loginRedirectUrl', $redirect_url);
[$url, ] = explode('?', $redirect_url);
if ($url !== $this->urlGenerator->linkToRoute('core.login.logout')) {
$this->initialStateService->provideInitialState('core', 'loginRedirectUrl', $redirect_url);
}
}

$this->initialStateService->provideInitialState(
Expand Down

0 comments on commit d3ab26c

Please sign in to comment.