Merge remote-tracking branch 'upstream/dev' into impersonate

This commit is contained in:
HB9HIL
2024-08-16 20:07:50 +02:00
83 changed files with 2578 additions and 1148 deletions

View File

@@ -412,7 +412,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,
@@ -454,14 +454,16 @@ 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 ?? '');
$qrg_unit = $this->session->userdata("qrgunit_$band") ?? ($this->user_options_model->get_options('frequency', array('option_name' => 'unit', 'option_key' => $band), $u->row()->user_id)->row()->option_value ?? '');
if ($qrg_unit !== '') {
$userdata['qrgunit_'.$band] = $qrg_unit;
} else {
$userdata['qrgunit_'.$band] = $this->frequency->defaultFrequencies[$band]['UNIT'];
}
}
$this->session->set_userdata($userdata);
}