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.
1 Answer(s)
-
0
Hi,
You can remove the
IdentityDataSeedContributor
and add yourDataSeedContributor
, it no longer create admin user&role when you removedIdentityDataSeedContributor
.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