Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Get User using UserId? #7061


User avatar
0
palco.ps created

How Can I get user infromation by using his id ,,?? **in asp.net core & angular 7


4 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, you can modify FindUsers in CommonLookupService to filter by input.Ids. Then use the first users in the responses.

    Otherwise, you can also add FindUserById() in UserAppService.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Palcodeveloper

    AspNet Zero gets basic information about user and the user's tenant at the app startup. You can access this information inside your app by injecting AppSessionService(app-session.service.ts) to your component.

    Almost all of the components in AspNet Zero implements AppComponentBase and it already injects AppSessionService. So probably you can access this information like below:

    in ts files: this.appSession.user

    in html files: {{appSession.user}}

  • User Avatar
    0
    palco.ps created

    i have an exc. here

  • User Avatar
    0
    ryancyq created
    Support Team

    can you share the exception stacktrace?