Hi all,
I have problem that, i am using custom helper function under controller class __construct() method. is it correct way to use that function is there ?
and also custom_helper.php file is autoload.
NOTE: is_user_login() function works with other methods but not work with construct method.
I am curious about know reason behind that, or if it is possible then how?
Thank in advance.
I have problem that, i am using custom helper function under controller class __construct() method. is it correct way to use that function is there ?
PHP Code:
public function __construct()
{
if(is_user_login()){ // function define in custom_helper.php
redirect('');
}
parent::__construct();
}
and also custom_helper.php file is autoload.
NOTE: is_user_login() function works with other methods but not work with construct method.
I am curious about know reason behind that, or if it is possible then how?
Thank in advance.