cancel
Showing results for 
Search instead for 
Did you mean: 

How to get lists 'Who is online'? (NOTED)

vinaxwater
Champ in-the-making
Champ in-the-making
I would like get "Who is online" for manager users status of administrator! Can you help me!

Thanks and Regards
vinaxwater
10 REPLIES 10

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you can not do that right now,
so I would propose solution:
you add property on user : last time action
you set this prop on login and click space functions.

so you say: users who did something in the system in past 5 min are online,
you add lucene to query this and that is all. ET 60min to finish.

hope it helps.

vinaxwater
Champ in-the-making
Champ in-the-making
are we check ticket of user when login?

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you can check active ticekts, but you do not get correct result.
you can login, and close browser and your admin will see this ass user is using the system not who is online.

vinaxwater
Champ in-the-making
Champ in-the-making
How many action in source code alfresco with your solution?
I think I should close this case for get users online. It should have taken so long.  :shock:

Thanks and Regards
vinaxwater

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
If by how many action in source code means how many code does this require well not more then 50 lines of code.

hsohaib
Champ on-the-rise
Champ on-the-rise
You could create a custom LoginBean, once the user logs in he is added to a list, once logged out he is removed.
It's instant, not time consuming, and won't affect your server's performance.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
if this is done only on login and logout, do not think would be correct. because user can  login and close browser and go home, system will show that user is online.
if this way is correct enough you should do it like this.

hsohaib
Champ on-the-rise
Champ on-the-rise
another way to accomplish this is by registering a node events listener ( implement org.alfresco.web.bean.NodeEventListener).
Your bean should maintain a list of online users that is cleared every 5/10 minutes. Whenever a node event is fired it means the user is online so you add him to the list, if the user doesn't navigat in Alfresco for 5/10 minutes you consider he logged out.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
Great idea.

<config evaluator="string-compare" condition="Node Event Listeners">
      <!– Managed beans that wish to be notified of Node events from the BrowseBean –>
      <!– Example - bean must implement org.alfresco.web.bean.NodeEventListener
      <node-event-listeners>
         <listener>ForumsBean</listener>
      </node-event-listeners> –>
   </config>