title: How to get variable from AppController beforeFilter in Other Controllers action in cakePHP 2.0
body: <p>I have queried on the User table inside the AppController as below</p>
  
  <pre><code>&lt;?php
  
  class AppController extends Controller {
  
      public function beforeFilter() {
  
          function beforeFilter() {
              parent::beforeFilter();
              if ($this-&gt;Session-&gt;read('Auth.User.id')) {
                  $userLoginInfo = $this-&gt;User-&gt;findByUserId($this-&gt;Session-&gt;read('Auth.User.id'));
                  $this-&gt;set('userLoginInfo', !empty($userLoginInfo) ? $userLoginInfo : NULL);
              }
          }
  
      }
  
  }
  ?&gt;
  </code></pre>
  
  <p>The <code>$userLoginInfo</code> is available in all <code>ctp</code> files, but I want to access it in all other controller actions as well.</p>