title: How do I hook into the Wordpress login system to stop some users programmatically?
body: <p>I am working on a Wordpress based portal which integrates with a custom-made e-commerce. 
  The e-commerce serves also as a 'control panel': all the roles are set up there. Some users are recorded but 'inactive'; they shouldn't be able to log into Wordpress. For this reason I need to hook into the Wordpress login system. </p>
  
  <p>If a user is, say, "bad_james", he cannot login, even if he has a valid WP login and PWD. The WP admin panel doesn't provide a a flag to block users.</p>
  
  <p>Is there a way to implement a login filter?</p>
  
  <p>Cheers,<br>
  Davide</p>