title: How to check if AspNetUser satisfies condition before PasswordSignInAsync?
body: <p>I've added a new column to AspNetUsers using the way proposed by Microsoft:</p>
  
  <pre><code>public class ApplicationUser : IdentityUser
  {
      public bool AdminConfirmed { get; set; }
  }
  </code></pre>
  
  <p>Which means that admin have to confirm user account after registering.</p>
  
  <p>The default way to log in is to do that:</p>
  
  <pre><code>var result = await _signInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, lockoutOnFailure: false);
  if (result.Succeeded)
  {
       _logger.LogInformation(1, "User logged in.");
       return RedirectToLocal(returnUrl);
  }
  </code></pre>
  
  <p>But as I see I don't have any possibility to edit the code behind "PasswordSignInAsync". <strong>So how can I add another condition that will cause this method to return result.IsNotAllowed if user's account is not confirmed by admin?</strong></p>
  
  <p>I also don't really know how can I get some data about user from database. My DbContext where I store authorization data look like this:</p>
  
  <pre><code>public class AuthorizationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
      {
          protected override void OnModelCreating(ModelBuilder builder)
          {
              base.OnModelCreating(builder);
          }
      }
  </code></pre>
  
  <p>And normally I would use:</p>
  
  <pre><code>public DbSet&lt;SomeModel&gt; SomeData { get; set; }
  </code></pre>
  
  <p>to access some data. But in case of AspNetUsers table that was generated for me by VisualStudio, I don't have any "c# class model" to put into DbSet. <strong>How can I then access user data to tell if his account is for example confirmed by admin?</strong></p>