[Bands] Insert bandsettings when creating a new user

pull/1595/head
Andreas 2022-09-06 12:32:54 +02:00
rodzic a9c6acf255
commit 84af5b83c6
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -149,8 +149,10 @@ class User_Model extends CI_Model {
return EEMAILEXISTS;
}
// Add user
// Add user and insert bandsettings for user
$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;
} else {
return EUSERNAMEEXISTS;