title: Get the ApplicationUser in a controller
body: <p>I am googleing for get the application user in a controller in ASP.NET Identity 3.0 but I only find results for 5 and lower.</p>
  
  <p>I am trying to get the <code>ApplicationUser</code> properties but I can't get the <code>ApplicationUser</code> at all. I guess it is easy because I am the only one with this problem.</p>
  
  <pre><code>using System.Linq;
  using System.Threading.Tasks;
  using Microsoft.AspNet.Mvc;
  using Microsoft.AspNet.Mvc.Rendering;
  using Microsoft.Data.Entity;
  using System;
  using System.Collections.Generic;
  using System.Reflection;
  using Microsoft.AspNet.Identity;
  using System.Security.Claims;
  
  namespace ApplicationUserFMLTest.Controllers
  {
      public class CustomClassController : Controller
      {
          private readonly UserManager&lt;ApplicationUser&gt; _userManager;
          private readonly SignInManager&lt;ApplicationUser&gt; _signInManager;
  
          private ApplicationDbContext _context;
  
          public CandidatesController(ApplicationDbContext context, UserManager&lt;ApplicationUser&gt; userManager, SignInManager&lt;ApplicationUser&gt; signInManager)
          {
              _context = context;
              _userManager = userManager;
              _signInManager = signInManager;
          }
  
          // GET: CustomClass
          public async Task&lt;IActionResult&gt; Index()
          {
              ApplicationUser currentUser = _userManager.FindByIdAsync(User.Identity.GetUserId()).Result;
  
  
              if (currentUser.PropBool)
                  return View(currentUser);
  
  
              return View();
          }
  
          // ManageController function
          private async Task&lt;ApplicationUser&gt; GetCurrentUserAsync()
          {
              return await _userManager.FindByIdAsync(HttpContext.User.GetUserId());
          }
  
      }
  }
  </code></pre>