[eluser]awpti[/eluser]
Been moifying the Erkanaauth library (sort of.. just changing the logic) and I'm getting
Trying to get property of non-object
Code:
function get_role($role) {
$query = $this->CI->db->get_where('trb_roles', array('name' => $role), 1, 0);
if ($query->num_rows() == 1)
{
return TRUE;
}
else
{
return FALSE;
}
}
What in the hell did I screw up?
Called via:
$this->eauth->get_role('admin');