Currently session Active User Details

I want to get to know details of ,current users who open the project session on web, if i close the project session tab on browser then user should be remove from active user list. i tried this

ds = system.perspective.getSessionInfo(projectFilter="test_dashboard")
	li=[]
	for item in ds:
			di = {}
			di['ID']=item['id']
			di['Project']=item['project']
			di['user']=item['username']
			li.append(di)
	return li

It given me list of active session user on web but if i am closing the session tab my username still in the list. please provide me the way of updating list of active session users on web and if user closed the session tab on web then user should be remove from the list

Browsers don't usually tell the webserver when they close a tab, so this is effectively impossible.

To expand on Phil:
From the server, there is no way to distinguish between "the user closed the tab" and "the user is experiencing a temporary network issue on a spotty network".
Thus, we must rely on the "session timeout" setting you can configure in the project properties to keep sessions alive for some period of time after communication stops.

3 Likes

Is there any way or script through which i can get the details of real time active user, session Id who opened session on web currently

Session properties in the UI.

what my scenerio is, my project is public and everyone can open the project session, there is functionality of id scanning. user come and id scan ,details is dumb into database table login time and status Active suppose if any how user close the session tab on browser without logging out then it he still seeing active on dashboard. i want fuctionality if user close the session tab on browser then i can take help of real time active users who open session in list format then i compare with my database table data collect all active user session id list and compare with real time active user who opens currently on browser if someone is not matching then entry should updated with logout time. help me how to acheive this

The closest you can get is the session timeout.

Sorry, no idea.