respect locale from db for users

This commit is contained in:
Ulf Gebhardt 2015-04-17 16:55:30 +02:00
parent b51715bed4
commit b527b74587

View File

@ -124,5 +124,10 @@ class Security {
protected static function startSession(){
if(!isset($_SESSION) && !headers_sent()){
\session_start();}}
\session_start();}
//respect locale from db if not set(right place here?)
if( isset($_SESSION[\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL)]) &&
$_SESSION[\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL)] instanceof User){
$_SESSION['values'][\SYSTEM\locale::SESSION_KEY] = $_SESSION[\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL)]->locale;}
}
}