Base solution for your next web application
Open Closed

Current logged in users or with active session #7098


User avatar
0
ashgadala created

Is there a way to get list of active users logged into a tenanat.


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

    From the documentation on SignalR AspNetCore Integration - Online Clients:

    ASP<span></span>.NET Boilerplate provides the IOnlineClientManager to get information about online users (inject IOnlineClientManager and use GetByUserIdOrNull, GetAllClients, IsOnline methods for example).

    Related
  • User Avatar
    0
    maharatha created

    I injected IOnlineClientManager but didn't see GetByUserIdorNull rather it's GetAllByUserId. And there is no clear documentation on how to get the number of active users. Any help is appreciated.

  • User Avatar
    0
    aaron created
    Support Team

    I injected IOnlineClientManager but didn't see GetByUserIdorNull rather it's GetAllByUserId.

    That's correct, since a user can have more than one client connection. That line in the documentation is outdated.

    And there is no clear documentation on how to get the number of active users.

    GetAllClients, group by client.UserId and then count.