Welcome Guest, Not a member yet? Register   Sign In
Undefined property problem

Hi i am trying to store some data in a session and then retrieve it in a controller. I am using dx_auth which has an event that is calles on ligin. so i use the event to add to the session info
function user_logged_in($user_id)
//run dx_auth function to get username
$uname = $this->ci->dx_auth->get_username('username');
//query my table to get propery_id using username
$query = $this->ci->db->get('master_property_reference');
$row = $query->row();
//add to ci_session database for use in each page
$add_prop_id = array(
'propertyid' => $row->query

I then call a controller to echo the info
class C_propman_v1 extends Controller {

function index()

$this->load->helper(array('form', 'url'));
$query = $this->ci->session->userdata($add_prop_id);
return $query->result();
echo $query;

but i keep on bombing out on $query = $this->ci->session->userdata($add_prop_id); with undefined property and Message: Trying to get property of non-object and Fatal error: Call to a member function userdata() on a non-object in C:\wamp\www\ci\system\application\controllers\c_propman_v1.php on line 13

any help would be appreciated as i am pulling my hair out on this.

Im declaring today to be "Hug a newbie and help them out with their code" day. I would really like to crack this problem today.

Theme © iAndrew 2016 - Forum software by © MyBB