Open Closed

Want to access UserAppService createUser method #145


User avatar
0
lalitChougule created

I want to create a user from my custom appService i.e I just want to call create() method of UserAppService from my custom appService. Which Interface do I have to inject in my appService ?


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can inject IdentityUserManager. it has CreateAsync method for creating users.

  • User Avatar
    0
    lalitChougule created

    Hi,

    I am able to create user using IdentityUserManager.CreateAsync method but once the user is created I want to return the inserted userId.

    How to get inserted UserId ?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Objects are passed by reference, you can get the id from the user object after the unit of work is saved.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 25, 2025, 11:10