title: MVC .NET | Check Another Field In The Login Process
body: <p>I have a MVC 5 project (.NET) and I added another field to my User object(and also to the DB in 'AspNetUsers' table) in identity (using this article <a href="http://www.itorian.com/2013/11/customize-users-profile-in-aspnet.html" rel="nofollow">http://www.itorian.com/2013/11/customize-users-profile-in-aspnet.html</a>).</p>
  
  <p>The field called "Active" and its purpose is to allow admins to freeze accounts (temporarily).</p>
  
  <p>Whats lead me to my question:</p>
  
  <p>How can I check that field for each user in the login process ? so if the field is set to '0' I denied the login and if the field is set to '1' I allow the login.</p>
  
  <p>I tried to do it in a separate query to database and its take forever(to do two queries for the login), killing my web app, I have to do the login and check that field in one query to the database.</p>
  
  <p>How can I do it ? Thank you.</p>