Store PHP sessions in the database
This commit is contained in:
committed by
Frédéric Guillot
parent
421531bd4f
commit
ccd177ada6
@@ -174,11 +174,7 @@ class LanguageModel extends Base
|
||||
*/
|
||||
public function getCurrentLanguage()
|
||||
{
|
||||
if ($this->userSession->isLogged() && ! empty($this->sessionStorage->user['language'])) {
|
||||
return $this->sessionStorage->user['language'];
|
||||
}
|
||||
|
||||
return $this->configModel->get('application_language', 'en_US');
|
||||
return $this->userSession->getLanguage() ?: $this->configModel->get('application_language', 'en_US');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,11 +39,7 @@ class TimezoneModel extends Base
|
||||
*/
|
||||
public function getCurrentTimezone()
|
||||
{
|
||||
if ($this->userSession->isLogged() && ! empty($this->sessionStorage->user['timezone'])) {
|
||||
return $this->sessionStorage->user['timezone'];
|
||||
}
|
||||
|
||||
return $this->configModel->get('application_timezone', 'UTC');
|
||||
return $this->userSession->getTimezone() ?: $this->configModel->get('application_timezone', 'UTC');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user