summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Schwartz <ned@theinterned.net>2011-06-10 15:04:50 -0700
committerNed Schwartz <ned@theinterned.net>2011-06-10 15:04:50 -0700
commit92b56d0bffe1b2f75be9b3b541206342a2163dc3 (patch)
treedb525e70bb804d12a33624af7e5727f9059171f6
parent21cfb28b05f4f5ed75e129ea9396952f7175bb3d (diff)
downloadsymfony-security-92b56d0bffe1b2f75be9b3b541206342a2163dc3.zip
symfony-security-92b56d0bffe1b2f75be9b3b541206342a2163dc3.tar.gz
symfony-security-92b56d0bffe1b2f75be9b3b541206342a2163dc3.tar.bz2
made logoutPath localizable as well
-rw-r--r--Http/Firewall/LogoutListener.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php
index 2fea16d..06e5d68 100644
--- a/Http/Firewall/LogoutListener.php
+++ b/Http/Firewall/LogoutListener.php
@@ -69,9 +69,10 @@ class LogoutListener implements ListenerInterface
{
$request = $event->getRequest();
+ $logoutPath = str_replace('{_locale}', $request->getSession()->getLocale(), $this->logoutPath);
$targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
- if ($this->logoutPath !== $request->getPathInfo()) {
+ if ($logoutPath !== $request->getPathInfo()) {
return;
}
@@ -96,3 +97,4 @@ class LogoutListener implements ListenerInterface
$event->setResponse($response);
}
+}