support "is online"/last login/session info for user.get

XMLWordPrintable

    • Type: Change Request
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 3.4.0beta1
    • Component/s: API (A)

      user.get api does not seem to support all the capabilities frontend has - specifically, "is online?" column is populated from the session data and in trunk r70896, there's a direct sql query in users.php:437 :

      $dbSessions = DBselect(
                      'SELECT s.userid,MAX(s.lastaccess) AS lastaccess,s.status'.
                      ' FROM sessions s'.
                      ' WHERE '.dbConditionInt('s.userid', zbx_objectValues($data['users'], 'userid')).
                      ' GROUP BY s.userid,s.status'
              );
      

      it would be useful to expose this in the api

            Assignee:
            Unassigned
            Reporter:
            richlv
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: