CrestApps.Components.Users 1.8.0-alpha

This is a prerelease version of CrestApps.Components.Users.
There is a newer version of this package available.
See the version list below for details.
dotnet add package CrestApps.Components.Users --version 1.8.0-alpha
                    
NuGet\Install-Package CrestApps.Components.Users -Version 1.8.0-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CrestApps.Components.Users" Version="1.8.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CrestApps.Components.Users" Version="1.8.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="CrestApps.Components.Users" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CrestApps.Components.Users --version 1.8.0-alpha
                    
#r "nuget: CrestApps.Components.Users, 1.8.0-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CrestApps.Components.Users@1.8.0-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CrestApps.Components.Users&version=1.8.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CrestApps.Components.Users&version=1.8.0-alpha&prerelease
                    
Install as a Cake Tool

Features

User Display Name

Provides a way to change how the user name is displayed. To set the display name format, navigate to Configuration >> Settings >> User Display Name.

In order for the customizable user name or the avatar to show up in the LoginMenu, edit LoginMenu.cshtml find a line that looks like the following

<i class="fa-solid fa-user fa-fw" aria-hidden="true"></i> @User.Identity.Name<b class="caret"></b>

And replace it with the following

@if (IsSectionDefined("UserMenuTitle"))
{
    @await RenderSectionAsync("UserMenuTitle", required: false)
}
else
{
    <i class="fa fa-user fa-fw" aria-hidden="true"></i> @User.Identity.Name
}

User Avatar

Provides a way to display an avatar for each user.

In order for the customizable user name or the avatar to show up in the UserMenu, edit UserMenu.cshtml find a line that looks like the following

<i class="fa-solid fa-fw fa-user" aria-hidden="true" data-bs-toggle="tooltip" data-bs-original-title="@User.Identity.Name"></i>

And replace it with.

@if (IsSectionDefined("UserMenuTitle"))
{
    @await RenderSectionAsync("UserMenuTitle", required: false)
}
else
{
    <i class="fa fa-user fa-fw" aria-hidden="true"></i> @User.Identity.Name
}

By default, a filter is added to inject default CSS to style the default avatar. However, if you want to add your own style you may remove the filter using something like this

services.Configure<MvcOptions>(options =>
{
    var filter = options.Filters.FirstOrDefault(x => x.GetType() == typeof(CrestApps.Components.Users.Filters.AvatarStylesFilter));
    if (filter != null)
    {
        options.Filters.Remove(filter);
    }
});

Dynamic Cache

When the "Dynamic Cache" feature in OrchardCore is enabled along with "User Avatar" or "User Display Name", it optimizes performance by caching shapes associated with user display names and avatars. If you wish to manually invalidate the cache, you can utilize the following tags:

  1. The user-display-name tag will clear the cached shapes for all users.
  2. The username:{username} tag will clear the cache for a specific user with the username {username}. Replace {username} with the actual username of the user you want to invalidate.
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.10.0-preview-0026 166 8/14/2025
1.10.0-preview-0025 196 6/20/2025
1.10.0-preview-0024 436 1/29/2025
1.10.0-preview-0023 852 9/9/2024
1.10.0-preview-0022 175 8/26/2024
1.10.0-preview-0021 121 8/26/2024
1.10.0-preview-0020 166 8/7/2024
1.10.0-preview-0009 144 7/22/2024
1.10.0-preview-0008 200 6/6/2024
1.10.0-preview-0007 121 6/6/2024
1.10.0-preview-0006 220 5/15/2024
1.10.0-preview-0005 146 5/9/2024
1.10.0-preview-0004 130 5/8/2024
1.10.0-preview-0003 132 5/7/2024
1.10.0-preview-0002 181 3/8/2024
1.10.0-preview-0001 142 3/7/2024
1.9.3 591 1/17/2024
1.9.2 150 1/17/2024
1.9.1 257 1/17/2024
1.9.0 383 11/9/2023
1.8.8 170 11/9/2023
1.8.7 151 11/9/2023
1.8.6 154 11/9/2023
1.8.5 220 10/30/2023
1.8.4 151 10/30/2023
1.8.3 254 10/5/2023
1.8.2 205 9/22/2023
1.8.1 184 9/19/2023
1.8.0 281 9/1/2023
1.8.0-alpha 191 8/28/2023
1.7.6 214 8/23/2023
1.7.5 206 8/22/2023
1.7.4 205 8/21/2023
1.7.3 189 8/21/2023
1.7.1 199 8/21/2023
1.7.0 248 8/15/2023