summaryrefslogtreecommitdiffstats
path: root/Http/EntryPoint/FormAuthenticationEntryPoint.php
diff options
context:
space:
mode:
Diffstat (limited to 'Http/EntryPoint/FormAuthenticationEntryPoint.php')
-rw-r--r--Http/EntryPoint/FormAuthenticationEntryPoint.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Http/EntryPoint/FormAuthenticationEntryPoint.php b/Http/EntryPoint/FormAuthenticationEntryPoint.php
index 12f077f..057de2d 100644
--- a/Http/EntryPoint/FormAuthenticationEntryPoint.php
+++ b/Http/EntryPoint/FormAuthenticationEntryPoint.php
@@ -48,10 +48,11 @@ class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface
*/
public function start(Request $request, AuthenticationException $authException = null)
{
+ $path = str_replace('{_locale}', $request->getSession()->getLocale(), $this->loginPath);
if ($this->useForward) {
- return $this->httpKernel->handle(Request::create($this->loginPath), HttpKernelInterface::SUB_REQUEST);
+ return $this->httpKernel->handle(Request::create($path), HttpKernelInterface::SUB_REQUEST);
}
- return new RedirectResponse(0 !== strpos($this->loginPath, 'http') ? $request->getUriForPath($this->loginPath) : $this->loginPath, 302);
+ return new RedirectResponse(0 !== strpos($path, 'http') ? $request->getUriForPath($path) : $path, 302);
}
}