title: Execute my code before any action of any controller
body: <p>I would like to check if my user have filled certain fields in his profile before he can access any action of any controller. 
  For example</p>
  
  <pre><code>if(empty(field1) &amp;&amp; empty(field2))
  {
     header("Location:/site/error")
  }
  </code></pre>
  
  <p>In yii1 I could do it in protected\components\Controller.php in init() function
  But in yii2 I'm not sure where to put my code. I cannot modify core files, but not sure what to do in backend of my advanced application to make it work.</p>
  
  <p>I know I can user beforeAction() but I have too many controllers to do that and to keep track of every controller</p>