FIX Language visible just after login does not match user choice.

This commit is contained in:
Laurent Destailleur 2020-08-07 14:05:05 +02:00
parent 71a6cf1207
commit 7e629d7ef4

View File

@ -655,6 +655,11 @@ if (!defined('NOLOGIN'))
if (GETPOST('lang', 'aZ09')) $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09');
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl) ? '?'.implode('&', $paramsurl) : ''));
exit;
} else {
// User is loaded, we may need to change language for him according to its choice
if (! empty($user->conf->MAIN_LANG_DEFAULT)) {
$langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
}
}
}
else