Author Topic: Problem with Ready Hook  (Read 3021 times)

Offline borgesbruno

  • Newbie
  • *
  • Posts: 1
Problem with Ready Hook
« on: May 15, 2014, 09:13:11 AM »
Hi everyone, I need a little help with the plugin dev,  I am doing my own plugin for ACL and this one will intercept each request for the index.php and analyse the task if the user has permission to use it,  otherwise it will be redirect.
   
I am trying use the ready hook, specified in http://trac.roundcube.net/wiki/Plugin_Hooks, all hooks is working except the ready, below my sample code:

   
   function init()
   {
      
      $this->add_hook('startup', array($this, 'startup'));    //Work =)   
       $this->add_hook('authenticate', array($this, 'authenticate')); //Work =)   
      $this->add_hook('ready', array($this, 'test'));  -> It doesn't work =(
      
      
   }
   
   function test($args){
                //Nothing inside this function work
      //echo $args . $var' ' . 'fADSFASDFASD';
      file_put_contents('/tmp/logTESTESTE',"OK");
      die("TETE");
   }

Any tip to solve it? How does work the ready hook?Why it is not work for me and others are ok?


« Last Edit: May 15, 2014, 09:22:18 AM by borgesbruno »