mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[API] Added extra check for station_id
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user