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
Help custom stats
Moderator: crythias
-
- 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
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.
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.
ITSM and FAQ modules installed.
-
- 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
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de