powered by Jive Software

Delete non active users

Is there a way of automatically deleting / removing a user that has not logged in for more than a day (or a specified time period) ? Or, delete a range of users

I have a lot of one-time users / processes that create an account, login and do what they need to do, then logout and delete the account.

However, there are circumstances where they do not log out properly (network issues / internet etc) and I want to be able to “vacuum” the user database with the exception of the “permanent” users.

I am using the internal database on 3.3.1 on linux



damn. No responses. I must be doing something wrong

well that just means: “no there is no easy way to do that” ^^

You could though query the database for the lastLogoffDate and write an external script that deletes the user through the User Service Plugin (http://www.igniterealtime.org/projects/openfire/plugins/userservice/readme.html)

I thought of doing that, too. Make a simple PHP plugin that can make an SQL query to get rid of stale accounts, but In the event MySQL is being used a back-end, the issue will be that the user’'s last logout date is not being recorded, ref: http://www.igniterealtime.org/forum/thread.jspa?threadID=27592

If the lastLogoffDate isn’'t populated you could try the user status plugin (http://www.igniterealtime.org/forum/thread.jspa?messageID=151147#151147). It saves a history of logins to MySQL.

The user-status plugin looks very good, but I do not want to modify the basic sql schema that came “out of the box” and end up with a customised database.

I dont want to log the user’‘s IP either, just the built-in functionality of showing a user’'s last logout date is what I need.