what i did to remedy this is.....
i add some codes to Auth_model.php (line 40 to 50 up) to be a able to add some data to the session table...
Code:
// User table query
$query = $this->db->select( $selected_columns )
->from( $this->db_table('user_table') )
->where( 'LOWER( username ) =', strtolower( $user_string ) )
->or_where( 'LOWER( email ) =', strtolower( $user_string ) )
->limit(1)
->get();
if( $query->num_rows() == 1 )
{
$row = $query->row_array();
/*my code 1925*/
$this->session->set_userdata('usr_id', $row['user_id'] ); // add nako
$this->session->set_userdata('campusid', $row['userscampus'] ); // add nako
$this->load->model('signinm'); // i add this model
$query = $this->signinm->does_user_exist($row['user_id']);
if ($query->num_rows() == 1) { /*mother loop asking if naa ba nakita nga account sa database*/
foreach ($query->result() as $rows) {
//$name = concat($rows->usr_fname,' ',$rows->usr_mname,' ',$rows->usr_lname,' ',$rows->namexcode);
$this->session->set_userdata('campusname', $rows->campusname );
$this->session->set_userdata('sy', $rows->sy );
$this->session->set_userdata('sem', $rows->sem );
$this->session->set_userdata('sycode', $rows->sycode );
$this->session->set_userdata('semcode', $rows->semcode );
$this->session->set_userdata('schoolname', $rows->schoolname );
$this->session->set_userdata('schoolid', $rows->schoolid );
$this->session->set_userdata('name', $rows->usersfn.' '.$rows->usersmn.' '.$rows->usersln.' '.$rows->nxdisplay ); // add nako // add nako
}
/*1925*/
bad coding... may i know how to add session data in simple way?