Welcome Guest, Not a member yet? Register   Sign In
Can't call a function defined in library folder
#1

[eluser]qpixo[/eluser]
I'm trying to call a function defined in a library folder. I'm calling in my Controller class. Some for reason, it doesn't go through this method calling. Can't get the echo display.

Does CI blocks any custom file defined on this folder? Any ways to fix that?

Code:
class Test extends CI_Controller {

// Constructor
function __construct() {
  
  parent::__construct();
  
  $this->load->library('tank_auth_groups', '', 'tank_auth');
}


public function index() {
  if(!$this->tank_auth->is_groups()) {
   echo 'get is_groups';
  }
}
}


Code:
class Tank_auth_groups extends Tank_auth {

// Constructor
function __construct() {
  
  parent::__contruct();
  
  $CI =& get_instance();
  $CI->load->model('tank_auth/ta_groups_users', 'users');
}

function is_groups() {
  return $CI->session->userdata('group_id') === '500';
}
}


Messages In This Thread
Can't call a function defined in library folder - by El Forum - 02-08-2012, 02:03 PM
Can't call a function defined in library folder - by El Forum - 02-08-2012, 02:31 PM
Can't call a function defined in library folder - by El Forum - 02-09-2012, 07:44 AM
Can't call a function defined in library folder - by El Forum - 02-09-2012, 10:24 AM
Can't call a function defined in library folder - by El Forum - 02-09-2012, 12:18 PM
Can't call a function defined in library folder - by El Forum - 02-09-2012, 12:31 PM
Can't call a function defined in library folder - by El Forum - 02-09-2012, 12:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB