Updated the Timezones.php library to work with the updated code.

This commit is contained in:
Alex Tselegidis 2021-10-28 14:00:48 +02:00
parent 8e11dddf4a
commit 61a718cb2f

View file

@ -12,7 +12,11 @@
* ---------------------------------------------------------------------------- */ * ---------------------------------------------------------------------------- */
/** /**
* Timezones * Timezones library
*
* Handles timezone related functionality.
*
* @package Libraries
*/ */
class Timezones { class Timezones {
/** /**
@ -503,9 +507,9 @@ class Timezones {
*/ */
public function __construct() public function __construct()
{ {
$this->CI = & get_instance(); $this->CI = &get_instance();
$this->CI->load->model('user_model'); $this->CI->load->model('users_model');
} }
/** /**
@ -523,13 +527,13 @@ class Timezones {
* *
* @return string * @return string
*/ */
public function get_session_timezone() public function get_session_timezone(): string
{ {
$default_timezone = $this->get_default_timezone(); $default_timezone = $this->get_default_timezone();
return $this->CI->session->has_userdata('timezone') $timezone = session('timezone');
? $this->CI->session->userdata('timezone')
: $default_timezone; return $timezone ?? $default_timezone;
} }
/** /**