Correcting lost user id data
这个提交包含在:
		
							父节点
							
								
									b0d87e5edf
								
							
						
					
					
						当前提交
						9310e17432
					
				
					共有  1 个文件被更改,包括 2 次插入 和 3 次删除
				
			
		|  | @ -305,12 +305,11 @@ class User extends CI_Controller { | ||||||
| 		$this->form_validation->set_rules('user_name', 'Username', 'required'); | 		$this->form_validation->set_rules('user_name', 'Username', 'required'); | ||||||
| 		$this->form_validation->set_rules('user_password', 'Password', 'required'); | 		$this->form_validation->set_rules('user_password', 'Password', 'required'); | ||||||
| 
 | 
 | ||||||
|  | 		$data['user'] = $query->row(); | ||||||
| 
 | 
 | ||||||
| 		if ($this->form_validation->run() == FALSE) | 		if ($this->form_validation->run() == FALSE) | ||||||
| 		{ | 		{ | ||||||
| 
 |  | ||||||
| 			$data['page_title'] = "Login"; | 			$data['page_title'] = "Login"; | ||||||
| 
 |  | ||||||
| 			$this->load->view('layout/header', $data); | 			$this->load->view('layout/header', $data); | ||||||
| 			$this->load->view('user/login'); | 			$this->load->view('user/login'); | ||||||
| 			$this->load->view('layout/footer'); | 			$this->load->view('layout/footer'); | ||||||
|  | @ -319,7 +318,7 @@ class User extends CI_Controller { | ||||||
| 		{ | 		{ | ||||||
| 			if($this->user_model->login() == 1) { | 			if($this->user_model->login() == 1) { | ||||||
| 				$this->session->set_flashdata('notice', 'User logged in'); | 				$this->session->set_flashdata('notice', 'User logged in'); | ||||||
| 				$this->user_model->update_session($data->user_id); | 				$this->user_model->update_session($data['user']->user_id); | ||||||
| 				redirect('dashboard'); | 				redirect('dashboard'); | ||||||
| 			} else { | 			} else { | ||||||
| 				$this->session->set_flashdata('error', 'Incorrect username or password!'); | 				$this->session->set_flashdata('error', 'Incorrect username or password!'); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用