Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

custom helper function

$
0
0
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 ?

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.

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>