Преглед изворни кода

In the spirit of 882a8e3f09c602a6f0ed3b5bd20e8d4688331500 allow for localized logout target url

Ned Schwartz пре 14 година
родитељ
комит
17b7b558ce
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      src/Symfony/Component/Security/Http/Firewall/LogoutListener.php

+ 2 - 0
src/Symfony/Component/Security/Http/Firewall/LogoutListener.php

@@ -69,6 +69,8 @@ class LogoutListener implements ListenerInterface
     {
         $request = $event->getRequest();
 
+        $this->targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
+
         if ($this->logoutPath !== $request->getPathInfo()) {
             return;
         }