How to get currently Logged in users list?

Hi All,

I am wondering how can I get the List of currently Logged in users?

Is there any way to figure it out? I was looking into tracker table but didn't get any luck so far.

Any hints or suggestions are highly appreciated.

Environment Details:
Sugar Professional Edition 6.5.14 (Build 1055)
PHP Version 5.3.10

Regards,
Sagar Salunkhe
  • Hi Sugarbot,
    Try this,
    global $current_user;
    You will get the current loged in user....

    Thanks & Regards
    Sumit Sahay

  • Sumit,

    Thanks for your response.

    I guess you got it wrong. I don't want current logged in user details. 

    As being admin, I want to know how many users are currently logged in into my application and their respective User names.

    Regards,
    Sagar Salunkhe
  • Hi Sagar,
    I got your problem, as an admin you want to know the loged in user name?isn't it?
    I think below link will help you, I used this module for the same purpose, you will also check the user ip address too for every loged in user and their type like are they admin or regular user....I hope this will work for you...

    http://www.sugarforge.org/projects/login-audit

    Thanks & Regards
    Sumit  Sahay

  • Sumit,

    Yes, Exactly. I want all active logged in Users List. :)

    I guess this plugin is not supported to Sugar 6.5.x as  per Project Info.

    I gone through project code as well. Logic hook is added on User login and logout. But what about auto-logout (PhP session expire) ?

    In paid versions, Sugar terminates other sessions of same user after login. I want to know this logic. HOw sugar come to know that other session is running for same user?

    Regards,
    Sagar Salunkhe
  • @Sagar, did you ever get your answer to solve your issues?
  • Hi Sugarbot,

    I don't have the answers to your question but just to give you a hint, you can check how the Tracker Report works.
    Login as admin and in the Home page, add new dashlet.
    Add the Tracker Reports and select Show Active Users.
    The report shows the active users and the time.

    hope it helps.
  • nah, not yet. :(

    That was not on priority so I skipped that task.

    ~Sagar
  • haan haan,.. Great!! thanks for your response!!
    It looks like buggy. I had 5 logged in users but on dashlet it was showing 3. For time being it is good.

    Thanks for your help.

    ~Sagar
  • BTW, the latest login audit module works fine on 6.5.16 Pro and CE

  • Any update on same?I am facing same issue.
1 2 3