Prune Users

Automatically delete user accounts based on their last activity
User avatar
kasimi
mChat developer
Posts: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Prune Users

#1

Post by kasimi » 11 Nov 2016, 16:29

phpBB extension - Prune Users

This extension deletes user accounts (including posts) whose last activity was before an adjustable amount of time. Founders, inactive accounts and bots are ignored.

3 new options are added in ACP -> Board Features:

prune_users.png
prune_users.png (7.44 KiB) Viewed 301 times
prune_users.png
prune_users.png (7.44 KiB) Viewed 301 times

Examples:
  • Enter 1 hour if you wish to delete user accounts who haven't been active for at least one hour.
  • Enter 2 days if you wish to delete user accounts who haven't been active for at least two days.
  • Enter 4 weeks if you wish to delete user accounts who haven't been active for at least four weeks.
  • Enter 6 months if you wish to delete user accounts who haven't been active for at least six months.
  • Enter 2 years if you wish to delete user accounts who haven't been active for at least two years.
You need to specify the time in English. Leave the field empty if no user accounts should be deleted (default value). The cron task runs once an hour.


Requirements
  • PHP at least 5.3.3
  • phpBB at least 3.1.0-b1
Download

Latest version: 1.1.1
https://github.com/kasimi/phpbb-ext-pru ... ses/latest


How to install, update and uninstall extensions: https://www.phpbb.com/extensions/installing/
Install path: ext/kasimi/pruneusers

colinshead
Posts: 1
Joined: 29 May 2017, 16:31

Re: Prune Users

#2

Post by colinshead » 29 May 2017, 16:40

This extension is potentially mighty useful.

Could an update permit pruned (i.e. deleted) user topics to be retained rather than deleted (as an option) ?

Could an update permit pruned users to be set 'inactive' rather than deleted, i.e. so that recovery is possible by an administrator ?

Can the time before prune be set in years in the ACP UI, i.e. is '1 year' equivalent to '12 months' ?

All the best

Colin

User avatar
kasimi
mChat developer
Posts: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#3

Post by kasimi » 29 May 2017, 17:08

Glad you like the extension. :+1:
colinshead wrote:retained rather than deleted
colinshead wrote:'inactive' rather than deleted
Yes to both. I'll look into adding options for them.
colinshead wrote:set in years
Yes. I have updated the examples in the first post.

User avatar
kasimi
mChat developer
Posts: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#4

Post by kasimi » 29 May 2017, 19:03

Fairly easy to implement. Please have a look at version 1.1.0 that adds both options, and another option to specify whether to delete or retain usernames on posts. :+1:

Remember to test the extension locally or with some test data before using it on a live board!

User avatar
kasimi
mChat developer
Posts: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#5

Post by kasimi » 07 Jul 2017, 12:07

Version 1.1.1 is now available. It fixes a small bug that caused an empty IP in admin logs when cron is run from phpbbcli.php

terry2
Donor
Posts: 152
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Prune Users

#6

Post by terry2 » 08 Aug 2017, 12:52

Works well on 3.2.1 if any one is wondering.

Added after 9 minutes 41 seconds:
May be some thing for future use add a box to select a user id not to be deleted ? so if on a test board a test account would remain ?

ivailo95
Posts: 1
Joined: 26 Jun 2018, 17:43

Re: Prune Users

#7

Post by ivailo95 » 06 Aug 2018, 19:48

where is this? :roll: :?:
Attachments
Screenshot 2018-08-06 22.47.38.png
Screenshot 2018-08-06 22.47.38.png (86.39 KiB) Viewed 303 times
Screenshot 2018-08-06 22.47.38.png
Screenshot 2018-08-06 22.47.38.png (86.39 KiB) Viewed 303 times
Screenshot 2018-08-06 22.47.34.png
Screenshot 2018-08-06 22.47.34.png (121.7 KiB) Viewed 303 times
Screenshot 2018-08-06 22.47.34.png
Screenshot 2018-08-06 22.47.34.png (121.7 KiB) Viewed 303 times

User avatar
kasimi
mChat developer
Posts: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#8

Post by kasimi » 08 Aug 2018, 08:24

The extension description in the first post was outdated. I updated it and added a screenshot of the settings. :+1:

User avatar
jan_2017
Distinguished Donor
Posts: 120
Joined: 13 May 2017, 18:07

Re: Prune Users

#9

Post by jan_2017 » 12 Aug 2018, 10:08

ivailo95 wrote:
06 Aug 2018, 19:48
where is this? :roll: :?:
The time is not correct

There is only "5"

:?:

User avatar
kasimi
mChat developer
Posts: 729
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Prune Users

#10

Post by kasimi » 12 Aug 2018, 20:40

Good catch, Jan! @ivailo, you are missing the unit, it should be something like 5 hours, 5 days, 5 weeks etc.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest