[API] Added extra check for station_id

This commit is contained in:
Andreas
2023-06-15 08:12:57 +02:00
parent e6f7d72a21
commit 563554dae5
2 changed files with 21 additions and 0 deletions

View File

@@ -423,6 +423,17 @@ class Stations extends CI_Model {
return null;
}
}
public function check_station_against_user($stationid, $userid) {
$this->db->select('station_id');
$this->db->where('user_id', $userid);
$this->db->where('station_id', $id);
$query = $this->db->get('station_profile');
if ($query->num_rows() == 1) {
return true;
}
return false;
}
}
?>