[Bands] Insert bandsettings when creating a new user

这个提交包含在:
Andreas 2022-09-06 12:32:54 +02:00
父节点 a9c6acf255
当前提交 84af5b83c6

查看文件

@ -149,8 +149,10 @@ class User_Model extends CI_Model {
return EEMAILEXISTS; return EEMAILEXISTS;
} }
// Add user // Add user and insert bandsettings for user
$this->db->insert($this->config->item('auth_table'), $data); $this->db->insert($this->config->item('auth_table'), $data);
$insert_id = $this->db->insert_id();
$this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, sig, sota, uscounties, was, vucc) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;");
return OK; return OK;
} else { } else {
return EUSERNAMEEXISTS; return EUSERNAMEEXISTS;