title: Stop execution after render in beforeFilter of CakePHP
body: <p>In my CakePHP 2 application i have a problem with beforeFilter.
  In <a href="https://stackoverflow.com/questions/1923863/continue-execution-after-render">this thread</a> it worked well. Because of old version of CakePHP.</p>
  
  <p>In my code, If user is not authorized, I want to show him "anotherview.ctp".
  I don't want to redirect visitor to another page. (because of adsense issues)</p>
  
  <p>When i use "this->render" in beforeFilter, the code in my "index" action is also run.
  I want to stop the execution after the last line of "beforeFilter".
  When I add "exit()" to beforeFilter, it broke my code.</p>
  
  <p>How can I stop execution in beforeFilter without breaking code?</p>
  
  <pre><code>class MyController extends AppController {
      function beforeFilter() {
          if ( $authorization == false )  {
                  $this-&gt;render('anotherview');
                  //exit();
              }
          }
      }
  
      function index() {
          // show authorized staff
      }           
  }
  </code></pre>