I have a library called privacy, I made a function private called _user_block_by_team
and i want call this function on another public function on the same library like the following code, but it give to me an error Fatal error: Call to undefined method Team::_user_block_by_team() where i'm doing mistake? This library is on autoload from the file autoload.php
class Privacy {
function __construct()
{
$this->ci =& get_instance();
}
function user_block_team($id_user) {
$this->ci->_user_block_by_team($id_user);
}
function _user_block_by_team($id_user) {
$this->ci->load->library('settings');
if ($this->ci->settings->check_user_blocked($id_user)) {
return false;
}
return true;
}
}
You can just call $this->_user_block_by_team($id_user).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With