0
Exceego created
- ABP Framework version: v7.3.2
- UI Type: MVC
- Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
Our requirement is to insert bulk users. We are using IdentityRepository InsertManyAsync to insert bulk users, it is working good except create password for the users because, we can not assign PasswordHash to IdentityUser entity as it's set parameter is protected and we don't want to use UserManager to create users.
Is there any alternate way to insert bulk users Please advise.
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
1 Answer(s)
-
0
hi
You can inject the
IPasswordHasher<IdentityUser>service. Then useObjectHelperto set the protected property.ObjectHelper.TrySetProperty(identityUser, x => x.PasswordHash, () => your_password);https://github.com/dotnet/aspnetcore/blob/main/src/Identity/Extensions.Core/src/IPasswordHasher.cs
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)