Skip to content

Commit

Permalink
When loading "loginAfterlinkSent" and user LoggedIn, try redirect to …
Browse files Browse the repository at this point in the history
…dashboard.
  • Loading branch information
paaton committed Aug 9, 2024
1 parent 01ec9bb commit 9e8e547
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/User/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ public function sendLoginEmail(Request $request, Response $response): Response
return $this->redirect($request, $response, 'loginAfterLinkSent');
}

public function showAfterLinkSent(Response $response): Response
public function showAfterLinkSent(Request $request, Response $response): Response
{
if ($request->getAttribute('user') !== null) {
return $this->redirect($request, $response, 'getDashboard');
}
return $this->view->render($response, 'kissj/login-link-sent.twig');
}

Expand Down

0 comments on commit 9e8e547

Please sign in to comment.