Accessing list of logged in users from external

English! place to talk about development, programming and coding
Post Reply
srx308
Znuny newbie
Posts: 40
Joined: 22 Jun 2012, 11:10
Znuny Version: 3.2.6
Real Name: Florian

Accessing list of logged in users from external

Post by srx308 »

Hi everybody,

Does somebody know if it's possible to access the list of the currently logged in users in OTRS from external?
Need this information for statistics stuff. Of course it would be best if I could find this information in the database.

Maybe someone can help me :)

Thanks,
Florian

EDIT: Oh sorry I forgot an important information for you: It's about OTRS 3.0.11
OTRS 3.2.6 with PostgreSQL 8.3.23 on SLES 11
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Accessing list of logged in users from external

Post by jojo »

you can check the session table
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
srx308
Znuny newbie
Posts: 40
Joined: 22 Jun 2012, 11:10
Znuny Version: 3.2.6
Real Name: Florian

Re: Accessing list of logged in users from external

Post by srx308 »

Hi jojo,
thank you for your answer!

I have checked the sessions table, but all the informations are encrypted?
I see there is a parameter 'UserID' in column session_value, but is there a way to decrypt?

Thanks!
OTRS 3.2.6 with PostgreSQL 8.3.23 on SLES 11
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Accessing list of logged in users from external

Post by jojo »

it is just a base64 encoding, so it can be decoded.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
srx308
Znuny newbie
Posts: 40
Joined: 22 Jun 2012, 11:10
Znuny Version: 3.2.6
Real Name: Florian

Re: Accessing list of logged in users from external

Post by srx308 »

Ah okay, great! Thank you very much.

And does somebody know how I have to filter the parameters, to get the result like it's in the 'Online'-Box in OTRS-Dashboard?
dashboard_online_box.jpg
You do not have the required permissions to view the files attached to this post.
OTRS 3.2.6 with PostgreSQL 8.3.23 on SLES 11
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Accessing list of logged in users from external

Post by jojo »

have a llok in the code?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
srx308
Znuny newbie
Posts: 40
Joined: 22 Jun 2012, 11:10
Znuny Version: 3.2.6
Real Name: Florian

Re: Accessing list of logged in users from external

Post by srx308 »

Hi,

I had a look in the code.
There is a LastRequestTime (GMT Unixtimestamp) parameter in the Sessions-Table.

DashboardUserOnline.pm Revision 1.20 - Line 165

If: LastRequestTime + (configuired IdleTime or as default 60 minutes) > SystemTime
Then: Show User in the Online-Box

Thanks for your help : )
OTRS 3.2.6 with PostgreSQL 8.3.23 on SLES 11
Post Reply