Base solution for your next web application
Open Closed

Get all app users from host login #315


User avatar
0
naeazach created

So when logging into host the only visible user is myself.

I'd like to return a list of all users on the site. But UserManager object appears to be bound to AbpSession. Is there a way to query the User list directly?

I'd like that to show in my host account in case i wind up with password problems on a tenant account that i can do the reset for.


2 Answer(s)
  • User Avatar
    0
    naeazach created

    To clarify, I have multi tenancy set up, and would like visibility in the user list to all users on the system, not just for the host tenant from that login.

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    You can only see host users on host view, tenant users in tenant view. That's by design. Users can reset their passwords on "forgot password" link in the login page.

    But, you may want to show all users for some reason, I understand it. Then you should play with data filters. First, read the documentation to understand it: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Data-Filters">http://www.aspnetboilerplate.com/Pages/ ... ta-Filters</a> (especially IMayHaveTenant filter since User entity implements it). So, when you disable filter, you can get all the users. Then, when you do something for a user, you can again disable filter or set MayHaveTenant filter parameter to that user's TenantId.