From ccd177ada6823c27a6408427f19c238fd701c39e Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 6 Dec 2017 16:19:11 -0800 Subject: Store PHP sessions in the database --- app/Model/TimezoneModel.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/Model/TimezoneModel.php') diff --git a/app/Model/TimezoneModel.php b/app/Model/TimezoneModel.php index 8b3e895a..ef6afc6a 100644 --- a/app/Model/TimezoneModel.php +++ b/app/Model/TimezoneModel.php @@ -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'); } /** -- cgit v1.2.3