Update session date based on the current user settings page updates

This commit is contained in:
Alex Tselegidis 2020-11-12 14:47:15 +02:00
parent 0c20363b8b
commit 8842e2d918

View file

@ -1565,7 +1565,15 @@ class Backend_api extends CI_Controller {
$this->load->model('user_model'); $this->load->model('user_model');
$this->user_model->save_user(json_decode($this->input->post('settings'), TRUE)); $settings = json_decode($this->input->post('settings'), TRUE);
$this->user_model->save_user($settings);
$this->session->set_userdata([
'user_email' => $settings['email'],
'username' => $settings['settings']['username'],
'timezone' => $settings['timezone'],
]);
} }
} }