Skip to content

Commit

Permalink
Fix for multi-locale bug
Browse files Browse the repository at this point in the history
  • Loading branch information
blueskies79 committed Jan 31, 2024
1 parent f390eff commit b37f3c0
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions src/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,13 @@ public function login($isSignup = false)
}

$extraAuth0Params = [];
$action="login";

// Show register tab instead of login tab
if ($isSignup === true) {
$action='signup';
// set config param for the lock so it opens up in signup tab
if($this->config()->get('multi_locale')) { // multi_locale true sends the language of the locale
$extraAuth0Params = [
'auth_action' => 'signup',
'locale' => Locale::getCurrentLocale()->Locale
];
} else {
$extraAuth0Params = [
'auth_action' => 'signup'
];
}

$action = ($isSignup === true) ? "signup" : "login";
$extraAuth0Params['auth_action'] = $action;

// set config param for the lock so it opens up in signup tab
if($this->config()->get('multi_locale')) { // multi_locale true sends the language of the locale
$extraAuth0Params['locale'] = Locale::getCurrentLocale()->Locale;
}

if ($email) {
Expand Down

0 comments on commit b37f3c0

Please sign in to comment.