Implement user settings

This commit is contained in:
Eike Foken
2011-09-15 18:28:45 +02:00
parent 59739561b4
commit 1496c44505
5 changed files with 72 additions and 3 deletions

View File

@@ -128,8 +128,17 @@ class Auth extends CI_Controller {
'phone' => $this->input->post('phone')
);
// update the users settings
$settings = array(
'projects_sort_recently' => $this->input->post('projects_sort_recently'),
'jobs_check_interval' => $this->input->post('jobs_check_interval'),
);
$this->user->updateSettings($settings, $user['id']);
$this->session->unset_userdata('settings'); // clear saved settings
if ($this->user->update($user['id'], $data)) {
$this->messages->add(_("Settings saved successfully"), 'success');
$this->messages->add(_("Changes saved successfully"), 'success');
redirect('auth/settings', 303);
}
}