add userid to band deletion

This commit is contained in:
HB9HIL
2026-03-16 00:50:21 +01:00
parent f9a7548b4a
commit 77f34cd942
2 changed files with 4 additions and 7 deletions

View File

@@ -118,8 +118,9 @@ class Band extends CI_Controller {
public function delete() {
$id = $this->input->post('id', true);
$userid = $this->session->userdata('user_id');
$this->load->model('bands');
$this->bands->delete($id);
$this->bands->delete($id, $userid);
}
public function activate() {

View File

@@ -300,12 +300,8 @@ class Bands extends CI_Model {
return true;
}
function delete($id) {
// Clean ID
$clean_id = $this->security->xss_clean($id);
// Delete Mode
$this->db->delete('bandxuser', array('id' => $clean_id));
function delete($id, $userid) {
$this->db->delete('bandxuser', array('id' => $id, 'userid' => $userid));
}
function saveBand($id, $band) {