Profile edit now redirects back to profile, unless user is an admin

这个提交包含在:
Andy Smith 2011-08-19 21:14:16 +01:00
父节点 74116240dd
当前提交 7016f46884

查看文件

@ -159,8 +159,13 @@ class User extends CI_Controller {
break; break;
// All okay, return to user screen // All okay, return to user screen
case OK: case OK:
$this->session->set_flashdata('notice', 'User '.$this->input->post('user_name').' edited'); if($this->session->userdata('user_id') == $this->input->post('id')) {
redirect('user'); $this->session->set_flashdata('notice', 'User '.$this->input->post('user_name').' edited');
redirect('user/profile');
} else {
$this->session->set_flashdata('notice', 'User '.$this->input->post('user_name').' edited');
redirect('user');
}
return; return;
} }
$this->load->view('layout/header'); $this->load->view('layout/header');