diff --git a/application/models/User_model.php b/application/models/User_model.php index 8e74048f6..7651c89d9 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -408,7 +408,7 @@ class User_Model extends CI_Model { if ($u == null) { $u = $this->get_by_id($id); } - + $userdata = array( 'user_id' => $u->row()->user_id, 'user_name' => $u->row()->user_name, @@ -450,7 +450,14 @@ class User_Model extends CI_Model { 'isWinkeyEnabled' => $u->row()->winkey, 'hasQrzKey' => $this->hasQrzKey($u->row()->user_id) ); - + + foreach (array_keys($this->frequency->defaultFrequencies) as $band) { + $qrg_unit = $this->session->userdata("qrgunit_$band") ?? ($this->user_options_model->get_options('frequency', array('option_name' => 'unit', 'option_key' => $band))->row()->option_value ?? ''); + if ($qrg_unit !== '') { + $userdata['qrgunit_'.$band] = $qrg_unit; + } + } + $this->session->set_userdata($userdata); }