@using BTCPayServer.Abstractions.Models @model UsersViewModel @{ ViewData.SetActivePage(ServerNavPages.Users); var nextUserEmailSortOrder = (string)ViewData["NextUserEmailSortOrder"]; var userEmailSortOrder = nextUserEmailSortOrder switch { "asc" => "desc", "desc" => "asc", _ => null }; var sortIconClass = "fa-sort"; if (userEmailSortOrder != null) { sortIconClass = $"fa-sort-alpha-{userEmailSortOrder}"; } const string sortByDesc = "Sort by descending..."; const string sortByAsc = "Sort by ascending..."; }

@ViewData["Title"]

Add User
@foreach (var user in Model.Users) { var status = user switch { { Disabled: true } => ("Disabled", "danger"), { Approved: false } => ("Pending Approval", "warning"), { EmailConfirmed: false } => ("Pending Email Verification", "warning"), _ => ("Active", "success") }; }
Email Created Status
@user.Email @foreach (var role in user.Roles) { @Model.Roles[role] } @user.Created?.ToBrowserDate() @status.Item1
@if (user is { EmailConfirmed: false, Disabled: false }) { Resend email } else if (user is { Approved: false, Disabled: false }) { Approve } else { @(user.Disabled ? "Enable" : "Disable") } Edit Remove