Skip to content

Commit

Permalink
bug #1473 Fix return type of change password action (HeahDude)
Browse files Browse the repository at this point in the history
This PR was merged into the main branch.

Discussion
----------

Fix return type of change password action

Commits
-------

d68b18c Fix return type of change password action
  • Loading branch information
javiereguiluz committed Dec 11, 2023
2 parents b0c6921 + d68b18c commit 83dbfc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function changePassword(

// The logout method applies an automatic protection against CSRF attacks;
// it's explicitly disabled here because the form already has a CSRF token validated.
return $security->logout(validateCsrfToken: false);
return $security->logout(validateCsrfToken: false) ?? $this->redirectToRoute('homepage');
}

return $this->render('user/change_password.html.twig', [
Expand Down

0 comments on commit 83dbfc9

Please sign in to comment.