mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-23 18:57:12 +00:00
Static Map API (#1098)
Added new Static Map Feature --------- Co-authored-by: phl0 <github@florian-wolters.de>
This commit is contained in:
@@ -358,6 +358,16 @@ class User_Model extends CI_Model {
|
||||
// Update the user
|
||||
$this->db->where('user_id', $fields['id']);
|
||||
$this->db->update($this->config->item('auth_table'), $data);
|
||||
|
||||
// Remove static map images in cache to make sure they are updated
|
||||
$this->load->model('Stations');
|
||||
$this->load->model('staticmap_model');
|
||||
$stations = $this->Stations->all_station_ids_of_user($fields['id']);
|
||||
$station_ids = explode(',', $stations);
|
||||
foreach ($station_ids as $station_id) {
|
||||
$this->staticmap_model->remove_static_map_image(trim($station_id));
|
||||
}
|
||||
|
||||
return OK;
|
||||
} else {
|
||||
return ENOSUCHUSER;
|
||||
|
||||
Reference in New Issue
Block a user