Base solution for your next web application
Open Closed

Amount of users logged by tenant #976


User avatar
0
inovatech created

Hi, It is possible, if so how, get the amount of users logged by tenant ?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Would you like to get count of online users of a tenant ?

  • User Avatar
    0
    inovatech created

    That's it. I want to get this information to limit the number of simultaneous users connected to the system.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Inject "IOnlineClientManager" in your class and then you can get online users of current tenant like this,

    _onlineClientManager.GetAllClients().Where(u=> u.TenantId == AbpSession.TenantId);
    

    I hope this helps.