Database storage of user last Login/Logout

Greetings all,

Thanks to gato and daniel for a lively discussion about what Openfire does / doesn’t do with regards to recording user login and log outs. I wanted to briefly summarize the discussion and point interested folks to a few Jira issues for you to comment / vote on.

The Problem: I would like to email users on my system that have not logged into my server during the past 3 months, or email users that have created accounts but have never successfully logged in. This does not appear to be currently possible.

Currently, there appears to be no method from within the database to determine:

  1. When a user last logged in.

  2. If a user is currently logged in.

  3. When a user last logged out when the user is currently logged in.

  4. If a user has ever been able to successfully log in.

daniel created 2 Jira issues regarding this:

While it may be a bit late in the 3.5.0 development cycle, the openfire devs were very open to suggestions about how to better handle this. Some of these changes will require a database schema update, so now is the time to make suggestions!

I would like to see Openfire always store the last login and logout time of each user. One could use this table to determine which users are logged in (where login > logout ).

If folks have other ideas or ways to currently do this, I would be happy to know how!

Thanks for a wonderful system! daryl


I see the milestone on these two Jira issues is 3.5.1, but they will require database modifications so I doubt 3.5.1 will see them fixed/implemented?



Anybody got further comments on this? I am wanting to take a swing on this with a patch, but I still don’t know what the developers want to see happen. A complete revamp on this feature is probably something I can’t patch up


Hi Daryl

I think is a very useful feature - I thought that from 3.5.x on, this is what the table JiveUserFlag was for ?

Hi Martyn,

This table is used to prevent users from logging in during a specified time period.