I have a partial named _Username which displays the currently logged in users menu and allows the user to change settings etc...
I need to check whether the current user has a confirmed email address in the database from this partial but for some reason can't get any information from the database in relation to the confirmed email column. I can get the username as you can see from the code below.
This is my partial code:
<div class="username">
<ul class="username__user">
<li>
<a asp-page="/Account/Manage/Index">@UserManager.GetUserName(User)</a>
<ul class="username__menu">
<li>Account</li>
<li>Settings</li>
<li>Messages</li>
<li>
<hr />
<form id="logoutForm" asp-page="/Account/Logout">
<button id="logout" class="btn btn--green" type="submit">Logout</button>
</form>
</li>
</ul>
</li>
</ul>
</div>
This partial is embedded inside the _Layout partial as well.
Any information regarding getting access to the UserManager would be appreciated.
I do have the @inject UserManager UserManager
declaration inside my _ViewImports as well.