You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @tobias-kuendig, I'm not sure if it is my mistake, Ive added a couple of languages to my site and after login the user is redirected back to default language. I got a suggestion how to fix it, but I also wanted to ask you if this is the correct solution to this problem.
I've updated OFFLINE\Mall\Components\SignUp component
protected function redirect()
{
// Check for session redirect.
if ($redirect = Session::pull('mall.login.redirect')) {
return redirect()->to($redirect);
}
// Check for a redirect parameter specified via GET/POST.
if ($redirect = input('redirect')) {
return redirect()->guest($this->controller->pageUrl($redirect));
}
// Otherwise, use the redirect property of the component.
if ($url = $this->property('redirect')) {
$translator = Translator::instance();
$locale = $translator->getLocale();
return \Redirect::to($translator->getPathInLocale($url, $locale));
}
return redirect()->back();
}
```
Hey @tobias-kuendig, I'm not sure if it is my mistake, Ive added a couple of languages to my site and after login the user is redirected back to default language. I got a suggestion how to fix it, but I also wanted to ask you if this is the correct solution to this problem.
I've updated OFFLINE\Mall\Components\SignUp component
if ($url = $this->property('redirect')) {
$translator = Translator::instance();
$locale = $translator->getLocale();
return \Redirect::to($translator->getPathInLocale($url, $locale));
}
The text was updated successfully, but these errors were encountered: