Open Closed

User Name, SurName, and UserName on Tenant creation #3361


User avatar
0
Leonardo.Willrich created
  • ABP Framework version: 5.3.0
  • UI type: Blazor WASM
  • DB provider: EF Core

Hi,

I want to create the tenant in the database and that the user name, surname, and username have a valid name instead of "admin" as it is hardcoded. What is the best way to implement that? I have a "Register" form where I can add the fields, but, also I'll be creating Tenants from the default CRUD.

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

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    You can remove the IdentityDataSeedContributor and add your DataSeedContributor, it no longer create admin user&role when you removed IdentityDataSeedContributor.

        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.Configure<AbpDataSeedOptions>(options =>
            {
                options.Contributors.Remove<IdentityDataSeedContributor>();
            });
        }
    

    You can see the data seed system document:

    https://docs.abp.io/en/abp/latest/Data-Seeding

    https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs

    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 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.