From f7709aff9570b29032457e9a67f1257b53931313 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 2 Jan 2016 15:08:50 +1030 Subject: [PATCH] Allow custom redirection after logging out --- src/Forum/Controller/LogOutController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Forum/Controller/LogOutController.php b/src/Forum/Controller/LogOutController.php index 839c2babd..1d95ec771 100644 --- a/src/Forum/Controller/LogOutController.php +++ b/src/Forum/Controller/LogOutController.php @@ -66,7 +66,9 @@ class LogOutController implements ControllerInterface { $session = $request->getAttribute('session'); - $response = new RedirectResponse($this->app->url()); + $url = array_get($request->getQueryParams(), 'return', $this->app->url()); + + $response = new RedirectResponse($url); if ($user = User::find($session->get('user_id'))) { if (array_get($request->getQueryParams(), 'token') !== $session->get('csrf_token')) {