Welcome Guest, Not a member yet? Register   Sign In
Restrict access to controller
#5

Thank you! This is perfect for the job Smile

(11-24-2016, 12:49 AM)salain Wrote: You can use something like this in your __construct
PHP Code:
public function __construct()
 
   {
 
       if(!is_cli()){
 
           echo "go away!!";
 
           die();
           
// Or redirect to an other page 
 
       }
 
       parent::__construct();
 
      

    

Reply


Messages In This Thread
Restrict access to controller - by JackWhite - 11-23-2016, 04:35 AM
RE: Restrict access to controller - by InsiteFX - 11-23-2016, 04:59 AM
RE: Restrict access to controller - by JackWhite - 11-24-2016, 12:14 AM
RE: Restrict access to controller - by salain - 11-24-2016, 12:49 AM
RE: Restrict access to controller - by JackWhite - 11-25-2016, 02:33 AM
RE: Restrict access to controller - by salain - 11-25-2016, 03:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB