FIX Language visible just after login does not match user choice.
This commit is contained in:
parent
e72e05d5f5
commit
aaaf690006
@ -644,6 +644,11 @@ if (!defined('NOLOGIN'))
|
|||||||
if (GETPOST('lang', 'aZ09')) $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09');
|
if (GETPOST('lang', 'aZ09')) $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09');
|
||||||
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl) ? '?'.implode('&', $paramsurl) : ''));
|
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl) ? '?'.implode('&', $paramsurl) : ''));
|
||||||
exit;
|
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 {
|
} else {
|
||||||
// We are already into an authenticated session
|
// We are already into an authenticated session
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user