Open Closed

Remove two auth and Profile picture tab from manage profile page #2926


User avatar
0
safi created

Hi

I want to remove two auth and picture tabs from the manage profile page so how can I delete or hide please let me know.

  • ABP Framework version: v4.4.3
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Thanks,

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can add an IProfileManagementPageContributor service and remove the PageGroup from the context.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    safi created

    IProfileManagementPageContributor

    do I need to use this code?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    No. This is build-in code, You need to remove the item from the context.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    safi created

    IProfileManagementPageContributor

    do I need to use this code?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You add a MyProfileManagementPageContributorservice and remove two auth and pictures from the context.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    safi created

    You add a MyProfileManagementPageContributorservice and remove two auth and pictures from the context.

    public class MyAccountProfileManagementPageContributor : IProfileManagementPageContributor { public async Task ConfigureAsync(ProfileManagementPageCreationContext context) { var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<AccountResource>>();

            if (await IsPasswordChangeEnabled(context))
            {
                context.Groups.Add(
                    new ProfileManagementPageGroup(
                        "Volo-Abp-Account-Password",
                        l["ProfileTab:Password"],
                        typeof(AccountProfilePasswordManagementGroupViewComponent)
                    )
                );
            }
    
            context.Groups.Add(
                new ProfileManagementPageGroup(
                    "Volo-Abp-Account-PersonalInfo",
                    l["ProfileTab:PersonalInfo"],
                    typeof(AccountProfilePersonalInfoManagementGroupViewComponent)
                )
            );
        }
    
        protected virtual async Task&lt;bool&gt; IsPasswordChangeEnabled(ProfileManagementPageCreationContext context)
        {
            var userManager = context.ServiceProvider.GetRequiredService&lt;IdentityUserManager&gt;();
            var currentUser = context.ServiceProvider.GetRequiredService&lt;ICurrentUser&gt;();
    
            var user = await userManager.GetByIdAsync(currentUser.GetId());
    
            return !user.IsExternal;
        }
    }
    

    do I need to call this anywhere?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer
    Configure<ProfileManagementPageOptions>(options =>
    {
        options.Contributors.Add(new MyAccountProfileManagementPageContributor());
    });
    
    
    
    public async Task ConfigureAsync(ProfileManagementPageCreationContext context)
    {
        context.Groups.Remove..
    
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    safi created

    ProfileManagementPageCreationContext

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    context.Groups.RemoveAll(x => x.Id == "Volo-Abp-Account-Picture" || x.Id == "Volo-Abp-Account-TwoFactor");

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.