打开 关闭

Want to access UserAppService createUser method #145


User avatar
0
lalitChougule 创建

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 答案
  • User Avatar
    0
    liangshiwei 创建
    支持团队 Fullstack Developer

    Hi,

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

  • User Avatar
    0
    lalitChougule 创建

    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 创建
    支持团队 Fullstack Developer

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

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11