title: CakePHP 2.x Auth Condition
body: <p>In my User Authentication I need to set a Condition (verified = 1) for the Login to happen. I know that I should be able to do it like this:</p>
  
  <pre><code>$this-&gt;Auth-&gt;userScope = array('User.verified' =&gt; '1');
  </code></pre>
  
  <p>I tried this in AppController and my UsersController beforeFilter function, but it doesn't do anything. Is there anything else I need to configure for this?</p>
  
  <p>I ended up doing (AppController):</p>
  
  <pre><code>public function isAuthorized($user) {
  
  if ($user['verified'] == '0') { 
  $this-&gt;Session-&gt;setFlash('You need to verify your Account first.');
  return false;
  }
  
  return false;
  }
  </code></pre>
  
  <p>This seems to be inelegant, since there should be the proper (userScope) way to do it, plus I now get two Flashes when verified = 0: The first one is the setFlash from above, and the second one is the regular authError.</p>
  
  <p>I checked both, the Docs and stackoverflow, but I found very little information on this topic.</p>