Help custom stats

Moderator: crythias

Locked
dario098
Znuny newbie
Posts: 5
Joined: 03 Sep 2014, 09:06
Znuny Version: 3.2.9

Help custom stats

Post by dario098 »

i need to make a query on mysql db to read the last login from customer users.

In which table can i find this field?

Thanks in advance
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Help custom stats

Post by Giulio Soleni »

Hi,
for presently logged in users you may look at the session table and check for 'UserSessionStart' entries... just elaborate the following query:
SELECT * FROM sessions WHERE data_key = 'UserSessionStart'

But this is valid for the presently logged on users or, more in general, for session not yet expired.

I think - but I am not sure - that to check the login of people that is no more connected you should parse the logs.
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
dario098
Znuny newbie
Posts: 5
Joined: 03 Sep 2014, 09:06
Znuny Version: 3.2.9

Re: Help custom stats

Post by dario098 »

i mean this :

Image

where can i find this field?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Help custom stats

Post by reneeb »

Code: Select all

SELECT * FROM customer_preferences WHERE preferences_key = 'UserLastLogin';
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Locked