[eluser]riwakawd[/eluser]
I am just trying to find out the best way to get the user id row number from my library and then set it in my sessions.
Code:
$this->load->library('user');
$data['action'] = site_url('login/login_credentials');
if ($this->form_validation->run($this)) {
$data = array(
'username' => $this->input->post('username'),
'user_id' => $user_id, // Trying to get the user id row number. From my library file.
'isLogged' => 1
);
$this->session->set_userdata($data);
redirect('dashboard');
} else {
$this->load->view('template/common/login', $data);
}
}