Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: davidhs on May 28, 2010, 10:16:26 PM

Title: Enhancements to purge inactive members
Post by: davidhs on May 28, 2010, 10:16:26 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2569)

Enhancements to purge inactive members

ABOUT...

Enhancements to purge inactive members, 1.3.9
© 2010-2021 by davidhs
© Croatian language 2011-2013 by Branko.
© Portuguese for Brazil and Portugal language 2011 by Eletromem
© Russian language 2010-2021 by Bugo
© Serbian latin language 2011-2013 by Branko.

(https://i.creativecommons.org/l/by/3.0/88x31.png) (https://creativecommons.org/licenses/by/3.0/)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (https://creativecommons.org/licenses/by/3.0/).

DESCRIPTION

Adds enhancements in "Administration Center > Forum Maintenance > Members > Remove Inactive Members":

(https://lh3.googleusercontent.com/xBFm5MxoieGC6ue1iVwDhrcQ9ruoQENIOe0pTQhZ_DyrA8nqMcdYQ_zGMHPNyg9HEoLs0cXePs4-8vINoUvG5M39Xiw5aqfCplMWsmYhjH_yTR_NfqgXDBkoEHhbV5HwAhfD06-7ig=w2400)

Without this MOD the forum removes all inactive members, with or without posts, and does not delete posts of removed members (changes to guest authors). If their number is very high may fail for lack of resources and not removed anything.

SMF COMPATIBILITY


LANGUAGES


DOWNLOAD

Link to MOD (https://custom.simplemachines.org/mods/index.php?mod=2569)

MANUAL INSTALLATION

See https://wiki.simplemachines.org/smf/Manual_installation_of_mods

COLLABORATE WITH THIS MOD

This work is licensed under a Creative Commons Attribution 3.0 Unported License (https://creativecommons.org/licenses/by/3.0/).

You are free to share and adapt this MOD. Also you can collaborate in different ways:

CHANGE LOG

Legend:   ! Fixed   + Added   - Removed   * Changed   @ Note

1.3.9   2021-02-13
------------------
! SMF 2.0.x: Do not use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.16-2.0.18 and 2.1 RC3.
+ Languages: New language string in russian, russian-utf8, thanks to Bugo.

1.3.8   2019-04-05
------------------
! SMF 2.1.x: Use HTML 5.
+ SMF compatibility: 2.1 RC1 to RC2.
! SMF 2.1.x: Languages: Only UTF-8 languages are used.

1.3.7   2017-12-19
------------------
+ SMF compatibility: 2.0.9-2.0.15 and 2.1 Beta 1 to Beta 3.
- Languages: spanish, spanish-utf8 (these are not used).

1.3.6   2014-06-23
------------------
! Use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.8.

1.3.5   2014-01-24
------------------
! Texts in languages.
+ SMF compatibility: 2.0.7.

1.3.4   2013-12-06
------------------
+ Languages: New language string in croatian, croatian-utf8, serbian_latin, serbian_latin-utf8, thanks to Branko..

1.3.3   2013-10-24
------------------
+ SMF compatibility: 2.0.6.

1.3.2   2013-08-18
------------------
+ SMF compatibility: 2.0.5.

1.3.1   2013-07-30
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License https://creativecommons.org/licenses/by/3.0/
! Option to remove members according to date registered only removes accounts activated.
- SMF compatibility: Support to Beta and RC versions.

1.3     2013-04-08
------------------
! SMF 2.0 Beta 3.1 Public, Beta 4 and RC1 to RC5: Option to remove members who have not activated their account uses date registered.
! SMF 2.0 to 2.0.3: Option to remove members according to date registered only removes accounts activated.
+ Option to remove members who have not activated their account after email change.
+ Option to remove members who have not approved their account.
+ Option to remove members who have not approved the deletion of their account.
+ Option to remove members who have not parental approval of their account.
+ SMF compatibility: 2.0.4.

1.2.6   2012-12-22
------------------
+ SMF compatibility: 2.0.3.
+ Redirect to "Remove Inactive Members" area after install.

1.2.5   2011-12-24
------------------
+ SMF compatibility: 2.0.2.

1.2.4   2011-09-20
------------------
+ SMF compatibility: 2.0.1.

1.2.3   2011-09-14
------------------
+ Languages: croatian, croatian-utf8, serbian_latin, serbian_latin-utf8, thanks to Branko..

1.2.2   2011-08-28
------------------
+ Languages: portuguese_brazilian, portuguese_brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Eletromem.

1.2.1   2011-06-17
------------------
! Position of operation search in modification.xml.
+ SMF compatibility: 2.0.

1.2     2011-04-03
------------------
+ Select button for delete posts of removed members.

1.1.2   2011-02-13
------------------
+ SMF compatibility: 2.0 RC5.

1.1.1   2011-01-17
------------------
+ SMF compatibility: 2.0 Beta 3.1 Public.

1.1     2010-12-14
------------------
+ Option to remove members according to date registered.

1.0.1   2010-11-06
------------------
+ SMF compatibility: 2.0 Beta 4, RC1 to RC1.2 and RC4.
+ Languages: english_british, english_british-utf8 (copy of english).
+ Languages: spanish, spanish-utf8 (copy of spanish_es).

1.0     2010-05-16
------------------
@ Join "Purge inactive members with a number of posts" and "Purge inactive members processed only a maximum number" into one MOD.
+ Input text button for maximum number of posts that members should have to be eliminated.
+ Input text button for maximum number of processed members.
+ SMF compatibility: 2.0 RC2 to RC3.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8.
+ Languages: russian, russian-utf8, thanks to Bugo.


Purge inactive members with a number of posts

1.0.2   2010-03-12
------------------
+ Languages: russian, russian-utf8, thanks to Bugo.
+ Languages: spanish_latin, spanish_latin-utf8 (copy of spanish_es).

1.0.1   2010-03-10
------------------
+ SMF compatibility: 2.0 RC3.

1.0     2010-03-06
------------------
+ SMF compatibility: 2.0 RC2.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8.


Purge inactive members processed only a maximum number

1.0.2   2010-03-12
------------------
+ Languages: russian, russian-utf8, thanks to Bugo.
+ Languages: spanish_latin, spanish_latin-utf8 (copy of spanish_es).

1.0.1   2010-03-10
------------------
+ SMF compatibility: 2.0 RC3.

1.0     2010-03-06
------------------
+ SMF compatibility: 2.0 RC2.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8.
Title: Re: Enhancements to purge inactive members
Post by: Fat_Man on May 29, 2010, 02:14:35 AM
Hi David,

I like what your modification does - but I don't think its going to do what i want it to do.

I'd like to purge inactive members who have not logged (last login) in the last say 150 days.

Title: Re: Enhancements to purge inactive members
Post by: davidhs on May 29, 2010, 05:28:03 AM
For this you not need my MOD. Use this:

QuoteRemove all members who have not logged in for 150 days.

My MOD add these condition:

QuoteRemove members who have _x_ posts or less (empty = any number)
Process a maximum of _x_ members (not to exceed the system resources)
Title: Re: Enhancements to purge inactive members, 1.0 (SMF 2.0 RC2, 2.0 RC3)
Post by: oleson92 on June 01, 2010, 05:38:33 PM
Is there a plan to add some notifications of deletion for users if they don't log in within x days you get a message then 30 days or so after that they are removed from the system.
Title: Re: Enhancements to purge inactive members, 1.0 (SMF 2.0 RC2, 2.0 RC3)
Post by: davidhs on June 02, 2010, 08:32:34 AM
No. Purge inactive members is not a scheduled task, is an action that is done when you submit the "Remove Now" buttom.

You need create a scheduled task, but I do not if it is possible to do in "Administration Center > Scheduled Tasks" or if exists a MOD to do this.
Title: Re: Enhancements to purge inactive members, 1.0 (SMF 2.0 RC2, 2.0 RC3)
Post by: Saxon044 on June 17, 2010, 06:02:52 PM
Hi David,

I have installed the mod but running it produces this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 10' at line 4
File: e:\Domains\saxon-web.co.uk\wwwroot\4rum\Sources\ManageMaintenance.php
Line: 1753

I am on MySQL5, if that is any help. Any ideas?

Cheers, Saxon.
Title: Re: Enhancements to purge inactive members, 1.0 (SMF 2.0 RC2, 2.0 RC3)
Post by: davidhs on June 19, 2010, 08:04:25 AM
I do not know but... Can you give me this data to see what can be?:
- Your version of SMF is 2.0 RC2 or RC3?
- Attach your file e:\Domains\saxon-web.co.uk\wwwroot\4rum\Sources\ManageMaintenance.php to your response
Title: Re: Enhancements to purge inactive members, 1.0.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: davidhs on November 13, 2010, 08:36:13 AM
New version:

1.0.1   2010-11-06
------------------
+ SMF compatibility: Adds 2.0 Beta 4, RC1 to RC1.2 and RC4.
+ Languages: Adds english_british, english_british-utf8 (copy of english).
+ Languages: Adds spanish, spanish-utf8 (copy of spanish_es).
Title: Re: Enhancements to purge inactive members, 1.0.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: robert_cyrus on December 13, 2010, 04:35:05 AM
Hi, I think a worthwhile addition to this mod would be to specify the last active date as well.
e.g. purge members with 0 posts who have not been active in 90 days
alternatively, you could specify the registered data
e.g. purge members with 0 posts who have been registered for 90 days
I get a lot of members who join and never post, this would allow me to get rid of their accounts.
thanks!
Title: Re: Enhancements to purge inactive members, 1.0.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: davidhs on December 13, 2010, 06:44:53 AM
Quote from: robert_cyrus on December 13, 2010, 04:35:05 AMe.g. purge members with 0 posts who have not been active in 90 days
This can already be done:

Remove all members who have not logged in for 90 days.
Remove members who have 0 posts or less (empty = any number)


Quote from: robert_cyrus on December 13, 2010, 04:35:05 AMalternatively, you could specify the registered data
e.g. purge members with 0 posts who have been registered for 90 days
You can not ask for the registered date, but you can see the activated data of the account:

Remove all members who have not activated their account for 90 days.
Remove members who have 0 posts or less (empty = any number)


Does this not enough?
Title: Re: Enhancements to purge inactive members, 1.0.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: robert_cyrus on December 13, 2010, 10:54:15 AM
Hi, my forum is set to auto activate all new members upon registration, so this change to the mod would allow me to purge these members.
I think if a new member has joined and not posted for 3 months, there should be an easy way to remove them.
thanks.
Title: Re: Enhancements to purge inactive members, 1.0.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: davidhs on December 13, 2010, 03:09:23 PM
Ok, now I understand. ;)

If possible, I do not want to change the basic text of SMF (in bold):
Remove all members who have not CONDITION for NUMBER days.

My English is not good. Is there any way to tell
Remove all members who have been registered for 90 days
using the phrase
Remove all members who have not CONDITION for 90 days.
?


Updated: Not, it not exist (in English or in Spanish). So I will do this update and I change the basic text of SMF to
Remove all members who have CONDITION for NUMBER days.
with CONDITION values:
- not activated their account
- not logged in
- been registered (NEW)
Title: Re: Enhancements to purge inactive members, 1.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: davidhs on December 14, 2010, 03:31:51 PM
New version:

1.1     2010-12-14
------------------
+ Option to remove members according to date registered.
Title: Re: Enhancements to purge inactive members, 1.1 (SMF 2.0 Beta 4 and RC1 to RC4)
Post by: robert_cyrus on December 30, 2010, 06:55:47 AM
Many thanks for this update, it works well. regards, Robert
Title: Re: Enhancements to purge inactive members, 1.1.1 (SMF 2.0 Beta 3.1-4 and RC1-RC4)
Post by: davidhs on January 22, 2011, 08:03:17 PM
New version:

1.1.1   2011-01-17
------------------
+ SMF compatibility: Adds 2.0 Beta 3.1 Public.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0 Beta 3.1-4 and RC1-RC5)
Post by: davidhs on February 13, 2011, 03:10:30 PM
New version:

1.1.2   2011-02-13
------------------
+ SMF compatibility: Adds 2.0 RC5.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: Galaxy Computers on February 27, 2011, 03:15:45 PM
Will this mod notify the memebers in email advance to let them that their account is about to be deleted on the forum and when their account is deleted and send them a reason why it was deleted?
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on February 27, 2011, 04:02:59 PM
No, this mod just add buttons to filter the members to be deleted, but the deletion is done as the original SMF. It is not a scheduled task.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: Galaxy Computers on February 27, 2011, 04:19:10 PM
I would be nice to have a mod that does something like that.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: sharks on February 27, 2011, 04:43:36 PM
This mod is so awesome! Totally what i could have used years ago, although i would make a request for a 1.1.13 compatible version, PLEASE! :)

It is very useful, as i regularly delete inactive members on my forums, and i have to do that manually all the time.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on February 27, 2011, 05:31:54 PM
Quote from: mtechama on February 27, 2011, 04:19:10 PMI would be nice to have a mod that does something like that.
Sorry, but now I have no plans to do this :( . Perhaps there is another mod that does this, I do not know.

Quote from: sharks on February 27, 2011, 04:43:36 PMThis mod is so awesome! Totally what i could have used years ago, although i would make a request for a 1.1.13 compatible version, PLEASE! :)

It is very useful, as i regularly delete inactive members on my forums, and i have to do that manually all the time.
A few weeks ago I upgraded my other mods with SMF 1.x support and I asked in board "SMF 1.0 Support" http://www.simplemachines.org/community/index.php?board=9.0 about "Purge inactive members" section in order to make this mod for this section, but in SMF 1.x do not exists this section (see http://www.simplemachines.org/community/index.php?topic=418529.0 ).

I have to do it from scratch and that is not my intention: This mod is an improvement smf function, not a new function.

I have no plans to support SMF 1.x in this mod, unless in a future version 1.1.x smf adding "Purge inactive members" section.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: teamvtec on March 11, 2011, 06:32:08 PM
Great mod but what about the posts the deleted members made?

I want them gone as well with deletion of the selected members. Is this even possible?
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on March 11, 2011, 07:36:41 PM
Quote from: teamvtec on March 11, 2011, 06:32:08 PMGreat mod but what about the posts the deleted members made?
They become of guest user (but username does not change). This is made by SMF, not by my MOD.

Quote from: teamvtec on March 11, 2011, 06:32:08 PMI want them gone as well with deletion of the selected members. Is this even possible?
Sorry, I do not understand. Can you explain more?
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: sharks on March 12, 2011, 03:12:15 AM
What teamvtec means is that when deleting the inactive members, there should also be an option where all the members' topics and posts can also be removed entirely. This is also what i am looking for, as i do not want to leave clutter all over my forum after removing some inactive members. When manually deleting a member from the forum, you can see that option, so i think it should be possible for you to integrate that function into your modification.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on March 12, 2011, 07:52:46 AM
Quote from: teamvtec on March 11, 2011, 06:32:08 PMI want them gone as well with deletion of the selected members. Is this even possible?
Quote from: sharks on March 12, 2011, 03:12:15 AMWhat teamvtec means is that when deleting the inactive members, there should also be an option where all the members' topics and posts can also be removed entirely. This is also what i am looking for, as i do not want to leave clutter all over my forum after removing some inactive members. When manually deleting a member from the forum, you can see that option, so i think it should be possible for you to integrate that function into your modification.

Thanks, now I understand. You want an option to delete the posts of deleted members.

I can add one checkbox Delete posts of removed members. I will see how I can do it...

It is dangerous because they could become meaningless topics when you delete those post. When I delete one member, there are two cases:

1. There is a topic with all posts of this member => No problem, I delete the whole topic.
Quote

Topic:
Post 1 of member 1
Post 2 of member 1
Post 3 of member 1
Post 4 of member 1


   delete member 1 
==============>



Topic is deleted

2. There is a topic with some posts of this member and others posts of others members => I can do one of these:
2.1. Delete whole topic => Problem, in this case I delete posts of others members.
Quote

Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1
Post 4 of member 2


   delete member 1 
==============>



Topic is deleted
2.2. Delete only posts of deleted member  => Problem, in this case the topic could become meaningless.
Quote

Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1
Post 4 of member 2


   delete member 1 
==============>
Topic without member 1:
Post 1 of member 2
Post 4 of member 2
2.3. No delete this topic.
Quote

Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1
Post 4 of member 2


   delete member 1 
==============>
Topic with guest member:
Post 1 of member 2
Post 2 of member guest 1
Post 3 of member guest 1
Post 4 of member 2
2.4. I can add one select buttom with options and do option 2.1, 2.2 or 2.3.
When removed member has posts in topic,
- delete whole topic
- delete only its posts
- delete nothing


What do you think?
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: sharks on March 13, 2011, 03:23:51 AM
OK, it is important to keep things simple and easy. There is no need to allow too many options, as the purpose of this last suggestion is to prevent the "Guest" posts all over the forum after those members are deleted by the modification.

A simple algorithm or logic that follows this:

IF member = topic starter, then whole topic is deleted.
ELSE member is not topic starter, then delete the replies only.

I think you should be able to work this logic into PHP (sorry, i don't know yet how to do any of that with PHP) but my point is that there is no need to have so many options. The only checkbox option should be "Delete posts of removed member(s)" and the rest should be done in the background with the script itself. I hope you get my meaning? I think this is a similar system as used by SMF when you manually delete a member from the latter's profile, and then select "Delete all topics and posts" from the drop-down list. The SMF default script checks systematically starting from the first condition IF member = topic starter, then whole topic is deleted. and then immediately follows ELSE member is not topic starter, then delete the replies only.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on March 13, 2011, 08:41:05 AM
Quote from: sharks on March 13, 2011, 03:23:51 AMI think this is a similar system as used by SMF when you manually delete a member from the latter's profile, and then select "Delete all topics and posts" from the drop-down list.
I did not notice this feature (remove members from their account). I will do similarly.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: teamvtec on March 23, 2011, 04:27:25 PM
Quote from: davidhs on March 12, 2011, 07:52:46 AM
Quote from: teamvtec on March 11, 2011, 06:32:08 PMI want them gone as well with deletion of the selected members. Is this even possible?
Quote from: sharks on March 12, 2011, 03:12:15 AMWhat teamvtec means is that when deleting the inactive members, there should also be an option where all the members' topics and posts can also be removed entirely. This is also what i am looking for, as i do not want to leave clutter all over my forum after removing some inactive members. When manually deleting a member from the forum, you can see that option, so i think it should be possible for you to integrate that function into your modification.

Thanks, now I understand. You want an option to delete the posts of deleted members.

I can add one checkbox Delete posts of removed members. I will see how I can do it...

It is dangerous because they could become meaningless topics when you delete those post. When I delete one member, there are two cases:

1. There is a topic with all posts of this member => No problem, I delete the whole topic.
Quote

Topic:
Post 1 of member 1
Post 2 of member 1
Post 3 of member 1
Post 4 of member 1


   delete member 1 
==============>



Topic is deleted

2. There is a topic with some posts of this member and others posts of others members => I can do one of these:
2.1. Delete whole topic => Problem, in this case I delete posts of others members.
Quote

Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1
Post 4 of member 2


   delete member 1 
==============>



Topic is deleted
2.2. Delete only posts of deleted member  => Problem, in this case the topic could become meaningless.
Quote

Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1
Post 4 of member 2


   delete member 1 
==============>
Topic without member 1:
Post 1 of member 2
Post 4 of member 2
2.3. No delete this topic.
Quote

Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1
Post 4 of member 2


   delete member 1 
==============>
Topic with guest member:
Post 1 of member 2
Post 2 of member guest 1
Post 3 of member guest 1
Post 4 of member 2
2.4. I can add one select buttom with options and do option 2.1, 2.2 or 2.3.
When removed member has posts in topic,
- delete whole topic
- delete only its posts
- delete nothing


What do you think?

This is what i need David! but sharks makes a very good suggestion
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on March 23, 2011, 07:10:30 PM
I will add a select button with options like select button of remove account:

Delete posts of removed members:
- None -- Delete nothing
- All posts -- Delete only posts, no topic (no delete first post of topic)
- Topics and posts -- Delete all

In some days...
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: teamvtec on March 24, 2011, 01:54:07 PM
Great, that sounds like a good addition to a nice mod ;)
Can't wait to try it....
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: teamvtec on March 25, 2011, 08:41:36 AM
I just thought of this...
Would it also be possible to set an automated message for members that are for example over 150 days of last being active?
Like:
Hey Member,

Please note that your account will be suspended in about 2 days. Due to long inactivity (150 days) Log into your account to keep your settings.

Regards, forum team
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: davidhs on March 25, 2011, 09:08:45 AM
Quote from: teamvtec on March 25, 2011, 08:41:36 AM
I just thought of this...
Would it also be possible to set an automated message for members that are for example over 150 days of last being active?
Like:
Hey Member,

Please note that your account will be suspended in about 2 days. Due to long inactivity (150 days) Log into your account to keep your settings.

Regards, forum team
Sorry, but now I have no plans to do this :(

This request already been asked before in this topic
http://www.simplemachines.org/community/index.php?topic=383900.msg2651125#msg2651125
http://www.simplemachines.org/community/index.php?topic=383900.msg2970631#msg2970631
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: teamvtec on March 26, 2011, 06:41:27 AM
I see, well sorry for that.
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: dougiefresh on March 27, 2011, 10:01:45 AM
Quote from: teamvtec on March 25, 2011, 08:41:36 AM
I just thought of this...
Would it also be possible to set an automated message for members that are for example over 150 days of last being active?
Like:
Hey Member,

Please note that your account will be suspended in about 2 days. Due to long inactivity (150 days) Log into your account to keep your settings.

Regards, forum team
You might look at this mod: Auto Email Inactive Ordinary Users (http://www.simplemachines.org/community/index.php?topic=238929.0).
Title: Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
Post by: teamvtec on March 28, 2011, 04:16:28 AM
thanks!
Title: Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
Post by: davidhs on April 03, 2011, 03:13:00 PM
New version:

1.2     2011-04-03
------------------
+ Select button for delete posts of removed members.
Title: Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
Post by: teamvtec on April 04, 2011, 07:18:52 AM
Great! Thank you for your time and effort ;)
Title: Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
Post by: dougiefresh on June 15, 2011, 03:26:51 PM
Thank you for the wonderful mod!  I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods.  This mod refused to install without some modification using 2.0 RC5 emulation.   

In ./Sources/ManageMaintenance.php, the first and second operation failed.

The first operation looks for for: $where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
and the second operation looks for: $where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
For 2.0, the first and second operation should be combined because the file now reads: $where_vars = array(
'time_limit' => $time_limit,
);
if ($_POST['del_type'] == 'activated')
{
$where = 'mem.date_registered < {int:time_limit} AND mem.is_activated = {int:is_activated}';
$where_vars['is_activated'] = 0;
}
else
$where = 'mem.last_login < {int:time_limit}';


Hope this info helps someone!

EDIT: Edited which operations failed cause I forgot one....
Title: Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
Post by: davidhs on June 17, 2011, 07:40:14 AM
In few days, I will update my MODs for SMF 2.0.
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: davidhs on June 21, 2011, 08:35:17 AM
New version:

1.2.1   2011-06-17
------------------
! Position of operation search in modification.xml.
+ SMF compatibility: Adds 2.0.
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: ElectricSquid on July 09, 2011, 10:48:37 PM
This would be a GREAT scheduled task!!

Purge all members with 0 posts in 60 days.

Where the underlined items the admin could change.
What your mod does, but as a scheduled task every 30 days.

A lot of spambot/xrumer registrations register on thousands of forums for months while the IP address they are using is still good (not blacklisted yet). They don't spam yet, just register. Then 2 months later they use all those valid logins to spam the hell out of all those forums.

Being able to automatically remove all 0 post members every 30 days would reduce their ability to do gain so many valid logins before they strike. This is why we all need this as a scheduled task.

What do you think? ;)
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: davidhs on July 10, 2011, 03:15:04 PM
Ok, I will see how make a scheduler task :) I don't know how this work!
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: Eletromem on August 21, 2011, 01:08:44 PM
Portuguese Translation for Brazil

language file

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:PurgeMemberEnhancement</id>
<version>1.2.1</version>

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD PurgeMemberEnhancement
$txt['maintain_members_since1_2'] = 'Remover todos os membros que';
$txt['maintain_members_activated_2'] = 'não ativaram a sua conta por';
$txt['maintain_members_logged_in_2'] = 'não ficaram logados por';
$txt['maintain_members_registered'] = 'foram registrado há';
$txt['maintain_members_post'] = 'Remover membros que têm %s mensagens ou menos <span class="smalltext">(vazio = qualquer membro)</span>';
$txt['maintain_members_delete_posts'] = 'Excluir mensagens de membros removidos';
$txt['maintain_members_delete_posts_none'] = 'nenhum';
$txt['maintain_members_delete_posts_all_posts'] = 'Todos os posts';
$txt['maintain_members_delete_posts_topics'] = 'Tópicos e mensagens';
$txt['maintain_members_max'] = 'Processar um máximo de %s membros <span class="smalltext">(para não exceder os recursos do sistema)</span>';
// END MOD PurgeMemberEnhancement
]]></add>
</operation>
</file>

</modification>


(http://www.newimg.me/images/32944065873618024831.jpg)

translation by Eletromem
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: davidhs on August 22, 2011, 07:16:57 AM
Thanks :) In a few days I add your translation to my MOD.
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: davidhs on August 22, 2011, 12:03:50 PM
Can somebody say to me if Portuguese Translation for Brazil by Eletromem is valid for Portugal?

Else, can somebody add Portuguese Translation for Portugal?

Thanks.
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: sharks on August 22, 2011, 03:43:29 PM
davidhs, i don't know Portuguese but if you need any French translation, i'd be happy to help. :) I hope you update your mod soon.
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: Eletromem on August 22, 2011, 07:09:14 PM
Quote from: davidhs on August 22, 2011, 07:16:57 AM
Thanks :) In a few days I add your translation to my MOD.

Friend below the other texts

Remove Inative Members = Remover membros inativos
Remove now = Remover agora
All member groups = Todos os grupos de membros

Quote from: davidhs on August 22, 2011, 12:03:50 PM
Can somebody say to me if Portuguese Translation for Brazil by Eletromem is valid for Portugal?

In fact they fully understand what is written


sorry my inglês
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: davidhs on August 23, 2011, 07:25:31 AM
Quote from: Eletromem on August 22, 2011, 07:09:14 PM
Quote from: davidhs on August 22, 2011, 12:03:50 PM
Can somebody say to me if Portuguese Translation for Brazil by Eletromem is valid for Portugal?
In fact they fully understand what is written
Ok, then I will add Portuguese for Brazil and Portugal with your translation :)

Quote from: sharks on August 22, 2011, 03:43:29 PM
davidhs, i don't know Portuguese but if you need any French translation, i'd be happy to help. :) I hope you update your mod soon.
Yes, of course. All languages are welcome. In all my MODs ;)
Title: Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
Post by: davidhs on August 29, 2011, 07:34:35 AM
Quote from: Eletromem on August 22, 2011, 07:09:14 PMFriend below the other texts

Remove Inative Members = Remover membros inativos
Remove now = Remover agora
All member groups = Todos os grupos de membros
These text are of SMF forum, not mine. I do not add in my MOD.

Perhaps you could write a warning to official Portuguese translator.
Title: Re: Enhancements to purge inactive members, 1.2.2 (SMF 2.0*-2.0)
Post by: davidhs on August 29, 2011, 07:47:44 AM
New version:

1.2.2   2011-08-28
------------------
+ Languages: Adds portuguese_brazilian, portuguese_brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Eletromem.
Title: Re: Enhancements to purge inactive members, 1.2.2 (SMF 2.0*-2.0)
Post by: Branko. on August 29, 2011, 04:20:47 PM
Hello, davidhs!!

Here is translation for serbian_latin :

$txt['maintain_members_since1_2'] = 'Uklonite sve članove koji ';
$txt['maintain_members_activated_2'] = 'nisu aktivirali svoj račun za';
$txt['maintain_members_logged_in_2'] = 'nisu prijavljeni za';
$txt['maintain_members_registered'] = 'su registrovani pre';
$txt['maintain_members_post'] = 'Uklonite članove koji imaju %s poruka ili manje <span class="smalltext">(prazno = bilo koji broj)</span>';
$txt['maintain_members_delete_posts'] = 'Obriši poruke uklonjenih članova';
$txt['maintain_members_delete_posts_none'] = 'Nijednu';
$txt['maintain_members_delete_posts_all_posts'] = 'Sve poruke';
$txt['maintain_members_delete_posts_topics'] = 'Teme i poruke';
$txt['maintain_members_max'] = 'Obradi najviše %s članova <span class="smalltext">(da ne prelazi sistemske resurse)</span>';


and serbian_latin-utf8 also
$txt['maintain_members_since1_2'] = 'Uklonite sve članove koji ';
$txt['maintain_members_activated_2'] = 'nisu aktivirali svoj račun za';
$txt['maintain_members_logged_in_2'] = 'nisu prijavljeni za';
$txt['maintain_members_registered'] = 'su registrovani pre';
$txt['maintain_members_post'] = 'Uklonite članove koji imaju %s poruka ili manje <span class="smalltext">(prazno = bilo koji broj)</span>';
$txt['maintain_members_delete_posts'] = 'Obriši poruke uklonjenih članova';
$txt['maintain_members_delete_posts_none'] = 'Nijednu';
$txt['maintain_members_delete_posts_all_posts'] = 'Sve poruke';
$txt['maintain_members_delete_posts_topics'] = 'Teme i poruke';
$txt['maintain_members_max'] = 'Obradi najviše %s članova <span class="smalltext">(da ne prelazi sistemske resurse)</span>';
Title: Re: Enhancements to purge inactive members, 1.2.2 (SMF 2.0*-2.0)
Post by: Branko. on August 29, 2011, 04:39:20 PM
And finally ....

Here is translation for croatian:
$txt['maintain_members_since1_2'] = 'Uklonite sve članove koji ';
$txt['maintain_members_activated_2'] = 'nisu aktivirali svoj račun za';
$txt['maintain_members_logged_in_2'] = 'nisu logirani za';
$txt['maintain_members_registered'] = 'su registrirani prije';
$txt['maintain_members_post'] = 'Uklonite članove koji imaju %s poruka ili manje <span class="smalltext">(prazno = bilo koji broj)</span>';
$txt['maintain_members_delete_posts'] = 'Obriši poruke uklonjenih članova';
$txt['maintain_members_delete_posts_none'] = 'Nijednu';
$txt['maintain_members_delete_posts_all_posts'] = 'Sve poruke';
$txt['maintain_members_delete_posts_topics'] = 'Teme i poruke';
$txt['maintain_members_max'] = 'Obradi najviše %s članova <span class="smalltext">(da ne prelazi resurse sustava)</span>';


and croatian-utf8 also
$txt['maintain_members_since1_2'] = 'Uklonite sve članove koji ';
$txt['maintain_members_activated_2'] = 'nisu aktivirali svoj račun za';
$txt['maintain_members_logged_in_2'] = 'nisu logirani za';
$txt['maintain_members_registered'] = 'su registrirani prije';
$txt['maintain_members_post'] = 'Uklonite članove koji imaju %s poruka ili manje <span class="smalltext">(prazno = bilo koji broj)</span>';
$txt['maintain_members_delete_posts'] = 'Obriši poruke uklonjenih članova';
$txt['maintain_members_delete_posts_none'] = 'Nijednu';
$txt['maintain_members_delete_posts_all_posts'] = 'Sve poruke';
$txt['maintain_members_delete_posts_topics'] = 'Teme i poruke';
$txt['maintain_members_max'] = 'Obradi najviše %s članova <span class="smalltext">(da ne prelazi resurse sustava)</span>';
Title: Re: Enhancements to purge inactive members, 1.2.2 (SMF 2.0*-2.0)
Post by: davidhs on August 30, 2011, 06:57:09 AM
Hello Branko.

Thanks for your serbian and croatian translation. :) :)

I can not wait to add these languages ​​to my mod, but I'll wait a week if anyone post more translations.
Title: Re: Enhancements to purge inactive members, 1.2.3 (SMF 2.0*-2.0)
Post by: davidhs on September 16, 2011, 07:57:29 AM
New version:

1.2.3   2011-09-14
------------------
+ Languages: Adds croatian, croatian-utf8, serbian_latin, serbian_latin-utf8, thanks to Branko..
Title: Re: Enhancements to purge inactive members, 1.2.4 (SMF 2.0*-2.0.1)
Post by: davidhs on September 21, 2011, 01:42:10 PM
New version:

1.2.4   2011-09-20
------------------
+ SMF compatibility: Adds 2.0.1.
Title: Re: Enhancements to purge inactive members, 1.2.4 (SMF 2.0*-2.0.1)
Post by: imno007 on September 24, 2011, 12:06:46 PM
Okay, just installed this one, no errors on install, but the first time I tried to use it I got this:

QuoteUnknown column 'id_member' in 'where clause'
File: /home/.../public_html/forums/Sources/Subs-Members.php
Line: 428

Any advice?

TIA!
Title: Re: Enhancements to purge inactive members, 1.2.4 (SMF 2.0*-2.0.1)
Post by: davidhs on September 24, 2011, 01:44:54 PM
Quote from: imno007 on September 24, 2011, 12:06:46 PM
Okay, just installed this one, no errors on install, but the first time I tried to use it I got this:

QuoteUnknown column 'id_member' in 'where clause'
File: /home/.../public_html/forums/Sources/Subs-Members.php
Line: 428

Any advice?

TIA!
What is your SMF version?
Can you attach the file Sources/Subs-Members.php of your forum?
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: davidhs on December 25, 2011, 02:15:05 PM
New version:
1.2.5   2011-12-24
------------------
+ SMF compatibility: Adds 2.0.2.
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: agent47 on February 15, 2012, 07:04:07 AM
Super mod! Just what I was looking for! :)
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: luuuciano on April 13, 2012, 05:09:48 PM
Nice mod, thanks for sharing it!

BTW, it would be too complicated to add an option, of sending a Private Message (with a customizable text body and subject?) to that members, instead deleting them?

The idea is to remind them about the forum, and try to catch them again... to be active members again
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: davidhs on April 13, 2012, 07:06:42 PM
Quote from: luuuciano on April 13, 2012, 05:09:48 PM
Nice mod, thanks for sharing it!

BTW, it would be too complicated to add an option, of sending a Private Message (with a customizable text body and subject?) to that members, instead deleting them?

The idea is to remind them about the forum, and try to catch them again... to be active members again
I do not know... I will see.
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: kibbelznbitz on December 12, 2012, 11:17:26 AM
Getting an undefined error when trying to run this modification on SMF 2.0.2 in ShareThis.php under Sources\:

41:         $admin_areas['config']['areas']['sharethis'] = array(   
42:                  'label' => $txt['share_default_menu'],
43:                  'file' => 'ShareThis.php',
44:                  'function' => 'ModifyShareSettings',
45:                  'icon' => 'posts.gif',   
46:                  'subsections' => array(
==>47:                     'general' => array($txt['share_general_settings']),
==>48:                     'buttons' => array($txt['share_buttons_settings']),
==>49:                     'icons' => array($txt['share_icons_settings']),
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: Kendrall on December 12, 2012, 01:26:09 PM
I've been looking for something like this to handle a key housekeeping duty on the forums I help maintain.  We've had users sign up in the past, but they never bother making a single post - or they make a few posts here and there, and without any sort of explanation simply become inactive for an extended period of time (>90 days)

I'll look more into this mod when I have some free time later this week (or hopefully this weekend *fingers crossed*).
Title: Re: Enhancements to purge inactive members, 1.2.5 (SMF 2.0*-2.0.2)
Post by: davidhs on December 13, 2012, 07:37:54 AM
Quote from: kibbelznbitz on December 12, 2012, 11:17:26 AM
Getting an undefined error when trying to run this modification on SMF 2.0.2 in ShareThis.php under Sources\:

41:         $admin_areas['config']['areas']['sharethis'] = array(   
42:                  'label' => $txt['share_default_menu'],
43:                  'file' => 'ShareThis.php',
44:                  'function' => 'ModifyShareSettings',
45:                  'icon' => 'posts.gif',   
46:                  'subsections' => array(
==>47:                     'general' => array($txt['share_general_settings']),
==>48:                     'buttons' => array($txt['share_buttons_settings']),
==>49:                     'icons' => array($txt['share_icons_settings']),

My MOD do not modify this file (ShareThis.php) and I do not found this file in my empty copy of SMF 2.0.2.

I do not see typo in your code...  ???

Can you attach here your ShareThis.php file? What MOD created this file?




Quote from: Kendrall on December 12, 2012, 01:26:09 PM
I've been looking for something like this to handle a key housekeeping duty on the forums I help maintain.  We've had users sign up in the past, but they never bother making a single post - or they make a few posts here and there, and without any sort of explanation simply become inactive for an extended period of time (>90 days)

I'll look more into this mod when I have some free time later this week (or hopefully this weekend *fingers crossed*).

You can deleted members without posts and inactive for more than 90 days:
QuoteRemove all members who have not logged in for 90 days.
Remove members who have 0 posts or less (empty = any number)
...
I do not recommend deleting members with few posts, because posts may be valid. You can read his posts, delete them if they are not useful and then delete members with 0 posts.
Title: Re: Enhancements to purge inactive members, 1.2.6 (SMF 2.0*-2.0.3)
Post by: davidhs on December 22, 2012, 05:54:55 AM
New version:
1.2.6   2012-12-22
------------------
+ SMF compatibility: Adds 2.0.3.
+ Redirect to "Remove Inactive Members" area after install.
Title: Re: Enhancements to purge inactive members, 1.2.6 (SMF 2.0*-2.0.3)
Post by: hardcore_f on February 12, 2013, 07:12:11 PM
Hi,
Can you add a filter to remove:

"Awaiting Approval"

So that it can be tied into other filter packages automatically and
Registered WITHIN 'XZY' days of current date.

Also note the English is incorrect

"been registered ago" , should be "Been registered MORE than" , Because  if you set it to something like 14 days then it removes members that have been in the DB several years based on the POSITION in the database.

That is to say when the delete is performed there appears top be no "order by"
Title: Re: Enhancements to purge inactive members, 1.2.6 (SMF 2.0*-2.0.3)
Post by: davidhs on February 13, 2013, 06:38:00 AM
I will see this enhancement.

In next version I will rewrite English text. Thanks :)
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: davidhs on April 09, 2013, 07:08:30 AM
New version:
1.3     2013-04-08
------------------
! SMF 2.0 Beta 3.1 Public, Beta 4 and RC1 to RC5: Option to remove members who have not activated their account uses date registered.
! SMF 2.0 to 2.0.3: Option to remove members according to date registered only removes accounts activated.
+ Option to remove members who have not activated their account after email change.
+ Option to remove members who have not approved their account.
+ Option to remove members who have not approved the deletion of their account.
+ Option to remove members who have not parental approval of their account.
+ SMF compatibility: Adds 2.0.4.
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: Arantor on April 09, 2013, 09:58:17 AM
Why are you still supporting SMF betas? I can understand the later RCs, but really there should be no support of SMF for unsupported, several-year-old, known-to-be-insecure versions of SMF. Heck, even the SMF RCs are now 2-4 years old.
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: davidhs on April 09, 2013, 02:14:08 PM
Quote from: Arantor on April 09, 2013, 09:58:17 AM
Why are you still supporting SMF betas? I can understand the later RCs, but really there should be no support of SMF for unsupported, several-year-old, known-to-be-insecure versions of SMF. Heck, even the SMF RCs are now 2-4 years old.
The truth is that I do not know, I suppose inertia: I already supported beta versions and RC and I have continued to do so.

I read http://wiki.simplemachines.org/smf/SMF_-_Which_version_of_SMF_should_I_use

On next update of my MODs I will support only current series 2.0.x and deprecated series 1.1.x (this MOD only support 2.0.x). I will remove support of obsolete series (1.0.x) and development versions (beta, RC)
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: mili123 on July 28, 2013, 09:58:35 PM
Hi,
I need this mod because I have over 100 000 spam profiles, 99% of them with 0 posts, but look like this mod don`t working, I have set:
Remove all members who have been registered more than 30 days
Remove members who have 0 posts
Process a maximum of 4000 members (I also used other numbers but that don`t help)

After click on button all is finished in few seconds with message:
The maintenance task 'Remove Inactive Members' was executed successfully.

But I have 0 members deleted, some of them not logged few years and have 0 posts!

Why?

Thanks.
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: davidhs on July 29, 2013, 08:29:23 AM
Quote from: mili123 on July 28, 2013, 09:58:35 PM
Hi,
I need this mod because I have over 100 000 spam profiles, 99% of them with 0 posts, but look like this mod don`t working, I have set:
Remove all members who have been registered more than 30 days
Remove members who have 0 posts
Process a maximum of 4000 members (I also used other numbers but that don`t help)

After click on button all is finished in few seconds with message:
The maintenance task 'Remove Inactive Members' was executed successfully.

But I have 0 members deleted, some of them not logged few years and have 0 posts!

Why?

Thanks.
Sorry, I do not know... What is your SMF version? I will try on my test forum.
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: mili123 on July 29, 2013, 11:06:56 AM
Last version 2.0.4...

Thanks.
Title: Re: Enhancements to purge inactive members, 1.3 (SMF 2.0*-2.0.4)
Post by: davidhs on July 30, 2013, 04:27:16 PM
I am sorry, it has a bug. :(

Option to remove members according to date registered must only removes accounts activated, but really only removes accounts no activated.

I will fix soon.
Title: Re: Enhancements to purge inactive members, 1.3.1 (SMF 2.0-2.0.4)
Post by: davidhs on July 31, 2013, 05:40:14 AM
New version:
1.3.1   2013-07-30
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/
! Option to remove members according to date registered only removes accounts activated.
- SMF compatibility: Removes support to Beta and RC versions.
Title: Re: Enhancements to purge inactive members, 1.3.2 (SMF 2.0-2.0.5)
Post by: davidhs on August 18, 2013, 08:18:06 AM
New version:
1.3.2   2013-08-18
------------------
+ SMF compatibility: Adds 2.0.5.
Title: Re: Enhancements to purge inactive members, 1.3.3 (SMF 2.0-2.0.6)
Post by: davidhs on October 24, 2013, 08:00:54 AM
New version:
1.3.3   2013-10-24
------------------
+ SMF compatibility: 2.0.6.
Title: Re: Enhancements to purge inactive members, 1.3.3 (SMF 2.0-2.0.6)
Post by: Gryzor on November 10, 2013, 07:46:02 AM
This looks like exactly what I need, but I have to make sure first: are those options complimentary? Meaning, say, "member registered 60 days ago AND post count is 0", or are the options independent?

Thanks for still maintaining this mod :)
Title: Re: Enhancements to purge inactive members, 1.3.3 (SMF 2.0-2.0.6)
Post by: Hristo on November 10, 2013, 08:09:34 AM
Yes, they are complimentary, but there is no "member registered XX days ago" option. There is "been registered more than XX days".
Title: Re: Enhancements to purge inactive members, 1.3.3 (SMF 2.0-2.0.6)
Post by: Gryzor on November 10, 2013, 08:12:56 AM
Ah, yes, what I meant indeed, and thanks for confirming! Much appreciated :)
Title: Re: Enhancements to purge inactive members, 1.3.3 (SMF 2.0-2.0.6)
Post by: Branko. on December 06, 2013, 07:49:58 AM
Version 1.3.3
Serbian latin and croatian
- converted to UTF-8 without BOM
- translated some strings
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: davidhs on December 06, 2013, 09:27:25 AM
Quote from: Branko. on December 06, 2013, 07:49:58 AM
Version 1.3.3
Serbian latin and croatian
- converted to UTF-8 without BOM
- translated some strings
Thanks! :)




New version:
1.3.4   2013-12-06
------------------
+ Languages: New language string in croatian, croatian-utf8, serbian_latin, serbian_latin-utf8, thanks to Branko..
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: luuuciano on December 07, 2013, 07:32:16 PM
I was reading the mod description, but... using this mod can I delete members that have no loged in for more than XX amount of days?

You know, to delete inactive members... or, better, maybe an option to send them an email previously... informing them that their account will be deleted by inactivity a few days later
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: davidhs on December 08, 2013, 06:20:00 AM
Quote from: luuuciano on December 07, 2013, 07:32:16 PM
I was reading the mod description, but... using this mod can I delete members that have no loged in for more than XX amount of days?

You know, to delete inactive members...
You can use this
QuoteRemove all members who have not logged in for XX days.

Quote from: luuuciano on December 07, 2013, 07:32:16 PM
or, better, maybe an option to send them an email previously... informing them that their account will be deleted by inactivity a few days later
At this moment I have not thought about doing. Perhaps using Scheduled Tasks.
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: Branko. on December 08, 2013, 08:31:31 AM
Quote from: luuuciano on December 07, 2013, 07:32:16 PM
maybe an option to send them an email previously... informing them that their account will be deleted by inactivity a few days later
With Auto Email Inactive Ordinary Users (http://custom.simplemachines.org/mods/index.php?mod=1186) you can send initial and final message to inactive users.
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: luuuciano on December 08, 2013, 07:32:17 PM
Quote from: davidhs on December 08, 2013, 06:20:00 AM
Quote from: luuuciano on December 07, 2013, 07:32:16 PM
I was reading the mod description, but... using this mod can I delete members that have no loged in for more than XX amount of days?

You know, to delete inactive members...
You can use this
QuoteRemove all members who have not logged in for XX days.

Thanks!

Quote from: Branko. on December 08, 2013, 08:31:31 AM
Quote from: luuuciano on December 07, 2013, 07:32:16 PM
maybe an option to send them an email previously... informing them that their account will be deleted by inactivity a few days later
With Auto Email Inactive Ordinary Users (http://custom.simplemachines.org/mods/index.php?mod=1186) you can send initial and final message to inactive users.

Nice one, thanks for sharing it Branko... btw, do you have it installed on a smf 2.0.x?
I was looking the mod thread, its like that mod will die (or, died long time ago...)
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: Branko. on December 09, 2013, 07:33:33 AM
Of course, I have it installed on a smf 2.0.x since 2.0 version (September 17, 2012) and work fine. I have not registered any change in server performance. Emulate to 2.0.6 and test it
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: PopUpSteve on January 13, 2014, 01:28:04 PM
Looks to be a great mod, just what I need to clean-up my member base, thanks.

I have a few questions.
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: davidhs on January 13, 2014, 02:22:23 PM
Quote from: PopUpSteve on January 13, 2014, 01:28:04 PM
I have a few questions.

  • The "Process a maximum of XXXX members". Does that mean it will only process that number of members (the default being 4000) or that number in the first pass (a pass being like when news letters are sent in groups so not to overwhelm the system)? And if it needs the total number of members (currently 37,562), will that blow-out the system resources?

  • By selecting only one member-group, all other member-groups are not even looked at, correct?

  • And by selecting only that one member-group (which has 13,432 members in it, all of which will be purged), should I then set the process maximum to the same size of that member-group?

1. Remove maximum xx members. Gets members which satisfies the conditions (max xx) and delete all except moderators.

2. Correct.

3. Yes, but if you put 13,432 on maximum members, perhaps your system resources will be exceed. I recommend you to make various purge of 4,000.
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: PopUpSteve on January 13, 2014, 02:45:22 PM
Great, thanks. And thanks for the quick reply. :)
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: PopUpSteve on January 13, 2014, 03:11:53 PM
Sorry, no joy on the purge. :(

I tried it several ways. To start with, I put only one member record in the member-group I'm trying to purge. Then, selecting that member-group I entered "Not logged in for 60 days" (last log in for that member was 2 1/2 years ago), and "0" posts (this member has none), Delete post = None. And for "Process a maximum of members" I tried 100, 1000, 4000, and the max number of members 37,564. No members were deleted. Each time I checked the actuate member table to verify.
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: davidhs on January 13, 2014, 04:11:20 PM
Quote from: PopUpSteve on January 13, 2014, 03:11:53 PM
Sorry, no joy on the purge. :(

I tried it several ways. To start with, I put only one member record in the member-group I'm trying to purge. Then, selecting that member-group I entered "Not logged in for 60 days" (last log in for that member was 2 1/2 years ago), and "0" posts (this member has none), Delete post = None. And for "Process a maximum of members" I tried 100, 1000, 4000, and the max number of members 37,564. No members were deleted. Each time I checked the actuate member table to verify.
I do not know... I wil try in my forum test.
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: davidhs on January 13, 2014, 05:45:26 PM
I made a user with date 1980, on a group.
With current date I login as admin and delete not logged in for 60 days with maximun 4000 members and selected his group. And works.

I do not know because do not work in your case. Perhaps group is incorrent? They have messages? ...
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: sorularbiz on January 13, 2014, 06:09:26 PM
thanks, nice post
Title: Re: Enhancements to purge inactive members, 1.3.4 (SMF 2.0-2.0.6)
Post by: PopUpSteve on January 14, 2014, 11:11:37 AM
Quote from: davidhs on January 13, 2014, 05:45:26 PM
I do not know because do not work in your case. Perhaps group is incorrent? They have messages? ...

No, that member has no messages or posts.
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: davidhs on January 25, 2014, 10:56:59 AM
New version:
1.3.5   2014-01-24
------------------
! Texts in languages.
+ SMF compatibility: 2.0.7.
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: iain sherriff on February 16, 2014, 01:51:17 PM
David.
Can this be altered to move selected members to a specific membergroup inplace of deleting them ?
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: davidhs on February 16, 2014, 02:47:52 PM
Quote from: iain sherriff on February 16, 2014, 01:51:17 PM
David.
Can this be altered to move selected members to a specific membergroup inplace of deleting them ?
I do not know... I will see on next update.
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: iain sherriff on February 16, 2014, 03:51:40 PM
Thank you  :)
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: usrfsledge on March 22, 2014, 10:41:15 AM
Hi David, I really like your mod.
Use it a lot to remove inactive members (two times a year). Before I remove the members, I'll drop them an email, so they can keep there account alive if they log in within 30 days or so. One month after the email, I will delete their accounts, using your mod.

My question is, can we use your mod to send the email, that will save me a lot of handwork, getting their emailadresses.

Tnx, keep up the good work!
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: davidhs on March 22, 2014, 11:37:38 AM
Quote from: usrfsledge on March 22, 2014, 10:41:15 AM
My question is, can we use your mod to send the email, that will save me a lot of handwork, getting their emailadresses.
I have not in mind to do this, but there is a way of doing
Quote from: Branko. on December 08, 2013, 08:31:31 AM
Quote from: luuuciano on December 07, 2013, 07:32:16 PM
maybe an option to send them an email previously... informing them that their account will be deleted by inactivity a few days later
With Auto Email Inactive Ordinary Users (http://custom.simplemachines.org/mods/index.php?mod=1186) you can send initial and final message to inactive users.
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: usrfsledge on March 22, 2014, 04:22:44 PM
Yeah, I used that mod in the past, but it didn't suited me  :-\

But thanks for your quick reply. I just keep hoping. .... one tickbox (email instead of delete) should fit my needs.
Title: Re: Enhancements to purge inactive members, 1.3.5 (SMF 2.0-2.0.7)
Post by: luuuciano on March 24, 2014, 02:01:31 PM
Quote from: usrfsledge on March 22, 2014, 04:22:44 PM
Yeah, I used that mod in the past, but it didn't suited me  :-\

Why not?
Title: Re: Enhancements to purge inactive members, 1.3.6 (SMF 2.0-2.0.8)
Post by: davidhs on June 24, 2014, 08:38:49 AM
New version:
1.3.6   2014-06-23
------------------
! Use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.8.
Title: Re: Enhancements to purge inactive members, 1.3.6 (SMF 2.0-2.0.9)
Post by: davidhs on October 06, 2014, 07:20:11 AM
Compatible with SMF 2.0.9.
Title: Re: Enhancements to purge inactive members, 1.3.6 (SMF 2.0-2.0.9)
Post by: shabbadoof on April 15, 2015, 03:06:20 AM
Hi

I am trying to install this mod on SMF 2.0.9 but am getting a lot of test failed - as you can see below

.   Execute Modification   ./Sources/ManageMaintenance.php   Test failed
   1.   Add After   ./Sources/ManageMaintenance.php   Test successful
   2.   Add After   ./Sources/ManageMaintenance.php   Test successful
   3.   Add After   ./Sources/ManageMaintenance.php   Test successful
   4.   Replace   ./Sources/ManageMaintenance.php   Test failed
*   2.   Execute Modification   ./Sources/Subs-Members.php   Test failed
   1.   Replace   ./Sources/Subs-Members.php   Test failed
   2.   Replace   ./Sources/Subs-Members.php   Test failed
   3.   Add Before   ./Sources/Subs-Members.php   Test successful
*   3.   Execute Modification   ./Sources/Who.php   Test successful
*   4.   Execute Modification   ./Themes/default/ManageMaintenance.template.php   Test failed
   1.   Add After   ./Themes/default/ManageMaintenance.template.php   Test successful
   2.   Replace   ./Themes/default/ManageMaintenance.template.php   Test failed

any ideas? Am I still OK to install it?
Title: Re: Enhancements to purge inactive members, 1.3.6 (SMF 2.0-2.0.9)
Post by: davidhs on April 15, 2015, 04:50:28 AM
Quote from: shabbadoof on April 15, 2015, 03:06:20 AM
Hi

I am trying to install this mod on SMF 2.0.9 but am getting a lot of test failed - as you can see below

.   Execute Modification   ./Sources/ManageMaintenance.php   Test failed
   1.   Add After   ./Sources/ManageMaintenance.php   Test successful
   2.   Add After   ./Sources/ManageMaintenance.php   Test successful
   3.   Add After   ./Sources/ManageMaintenance.php   Test successful
   4.   Replace   ./Sources/ManageMaintenance.php   Test failed
*   2.   Execute Modification   ./Sources/Subs-Members.php   Test failed
   1.   Replace   ./Sources/Subs-Members.php   Test failed
   2.   Replace   ./Sources/Subs-Members.php   Test failed
   3.   Add Before   ./Sources/Subs-Members.php   Test successful
*   3.   Execute Modification   ./Sources/Who.php   Test successful
*   4.   Execute Modification   ./Themes/default/ManageMaintenance.template.php   Test failed
   1.   Add After   ./Themes/default/ManageMaintenance.template.php   Test successful
   2.   Replace   ./Themes/default/ManageMaintenance.template.php   Test failed

any ideas? Am I still OK to install it?
You do not install this mod with errors.

I am not in home (this and next week) and I can not see source code. Perhaps you have install another mod and this modify same area of source code.
Title: Re: Enhancements to purge inactive members, 1.3.6 (SMF 2.0-2.0.9)
Post by: davidhs on May 23, 2015, 11:45:23 AM
To moderators: Text to move to first post
QuoteSubject:
QuoteEnhancements to purge inactive members, 1.3.6 (SMF 2.0-2.0.10)
Body:
Quote
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2569)




Enhancements to purge inactive members

ABOUT...

Enhancements to purge inactive members, 1.3.6
© 2010-2015 by davidhs
© Croatian language 2011-2013 by Branko.
© Portuguese for Brazil and Portugal language 2011 by Eletromem
© Russian language 2010-2011 by Bugo
© Serbian latin language 2011-2013 by Branko.

(http://i.creativecommons.org/l/by/3.0/88x31.png) (http://creativecommons.org/licenses/by/3.0/)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/).

DESCRIPTION

Adds enhancements in "Administration Center > Forum Maintenance > Members > Remove Inactive Members":

  • Options to remove members who have not activated their account after email change, have not approved their account, have not approved the deletion of their account or have not parental approval of their account.
  • Option to remove members according to date registered.
  • Maximum number of posts that members should have to be eliminated. Default value is 0.
  • Delete posts of removed members. Possible values are: None, All posts, Topics and posts. Default value is None.
  • Maximum number of processed members to delete members. This is in order not to exceed the system resources. Default value is 4,000.

(https://googledrive.com/host/0B7M1e_-FeoeERlA5SFJVOHNqN3c/purge_member_enhancement.png)

Without this MOD the forum removes all inactive members, with or without posts, and does not delete posts of removed members (changes to guest authors). If their number is very high may fail for lack of resources and not removed anything.

SMF COMPATIBILITY


  • SMF 2.0 to 2.0.10.

LANGUAGES


  • croatian.
  • english, english_british.
  • portuguese_brazilian, portuguese_pt (incomplete).
  • russian (incomplete).
  • serbian_latin.
  • spanish, spanish_es, spanish_latin.

If you want help translating it into other languages, you can add the translation in this topic.

DOWNLOAD

Link to MOD (http://custom.simplemachines.org/mods/index.php?mod=2569)

MANUAL INSTALLATION

See http://wiki.simplemachines.org/smf/Manual_installation_of_mods

SUPPORT AND COMMENTS

In English: http://www.simplemachines.org/community/index.php?topic=383900.0
In Spanish: http://www.simplemachines.org/community/index.php?topic=384107.0

CHANGE LOG

Legend:   ! Fixed   + Added   - Removed   * Changed   @ Note

1.3.6   2014-06-23
------------------
! Use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.8.

1.3.5   2014-01-24
------------------
! Texts in languages.
+ SMF compatibility: 2.0.7.

1.3.4   2013-12-06
------------------
+ Languages: New language string in croatian, croatian-utf8, serbian_latin, serbian_latin-utf8, thanks to Branko..

1.3.3   2013-10-24
------------------
+ SMF compatibility: 2.0.6.

1.3.2   2013-08-18
------------------
+ SMF compatibility: 2.0.5.

1.3.1   2013-07-30
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/
! Option to remove members according to date registered only removes accounts activated.
- SMF compatibility: Support to Beta and RC versions.

1.3     2013-04-08
------------------
! SMF 2.0 Beta 3.1 Public, Beta 4 and RC1 to RC5: Option to remove members who have not activated their account uses date registered.
! SMF 2.0 to 2.0.3: Option to remove members according to date registered only removes accounts activated.
+ Option to remove members who have not activated their account after email change.
+ Option to remove members who have not approved their account.
+ Option to remove members who have not approved the deletion of their account.
+ Option to remove members who have not parental approval of their account.
+ SMF compatibility: 2.0.4.

1.2.6   2012-12-22
------------------
+ SMF compatibility: 2.0.3.
+ Redirect to "Remove Inactive Members" area after install.

1.2.5   2011-12-24
------------------
+ SMF compatibility: 2.0.2.

1.2.4   2011-09-20
------------------
+ SMF compatibility: 2.0.1.

1.2.3   2011-09-14
------------------
+ Languages: croatian, croatian-utf8, serbian_latin, serbian_latin-utf8, thanks to Branko..

1.2.2   2011-08-28
------------------
+ Languages: portuguese_brazilian, portuguese_brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Eletromem.

1.2.1   2011-06-17
------------------
! Position of operation search in modification.xml.
+ SMF compatibility: 2.0.

1.2     2011-04-03
------------------
+ Select button for delete posts of removed members.

1.1.2   2011-02-13
------------------
+ SMF compatibility: 2.0 RC5.

1.1.1   2011-01-17
------------------
+ SMF compatibility: 2.0 Beta 3.1 Public.

1.1     2010-12-14
------------------
+ Option to remove members according to date registered.

1.0.1   2010-11-06
------------------
+ SMF compatibility: 2.0 Beta 4, RC1 to RC1.2 and RC4.
+ Languages: english_british, english_british-utf8 (copy of english).
+ Languages: spanish, spanish-utf8 (copy of spanish_es).

1.0     2010-05-16
------------------
@ Join "Purge inactive members with a number of posts" and "Purge inactive members processed only a maximum number" into one MOD.
+ Input text button for maximum number of posts that members should have to be eliminated.
+ Input text button for maximum number of processed members.
+ SMF compatibility: 2.0 RC2 to RC3.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8.
+ Languages: russian, russian-utf8, thanks to Bugo.


Purge inactive members with a number of posts

1.0.2   2010-03-12
------------------
+ Languages: russian, russian-utf8, thanks to Bugo.
+ Languages: spanish_latin, spanish_latin-utf8 (copy of spanish_es).

1.0.1   2010-03-10
------------------
+ SMF compatibility: 2.0 RC3.

1.0     2010-03-06
------------------
+ SMF compatibility: 2.0 RC2.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8.


Purge inactive members processed only a maximum number

1.0.2   2010-03-12
------------------
+ Languages: russian, russian-utf8, thanks to Bugo.
+ Languages: spanish_latin, spanish_latin-utf8 (copy of spanish_es).

1.0.1   2010-03-10
------------------
+ SMF compatibility: 2.0 RC3.

1.0     2010-03-06
------------------
+ SMF compatibility: 2.0 RC2.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8.





Compatible with SMF 2.0.10.
Title: Re: Enhancements to purge inactive members
Post by: davidhs on September 23, 2015, 09:01:25 AM
Compatible with SMF 2.0.11.
Title: Re: Enhancements to purge inactive members
Post by: davidhs on October 12, 2016, 08:00:54 AM
Compatible with SMF 2.0.12.
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on October 13, 2016, 04:28:05 PM
Greatly appreciated!!

Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
Title: Re: Enhancements to purge inactive members
Post by: davidhs on October 13, 2016, 04:53:08 PM
Quote from: SMiFFER on October 13, 2016, 04:28:05 PM
Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
I don't know... I will see.
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on October 18, 2016, 03:45:55 AM
Quote from: davidhs on October 13, 2016, 04:53:08 PM
Quote from: SMiFFER on October 13, 2016, 04:28:05 PM
Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
I don't know... I will see.
That would really make it SUPERB then :D
Title: Re: Enhancements to purge inactive members
Post by: davidhs on January 12, 2017, 03:52:39 PM
Compatible with SMF 2.0.13.
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on January 31, 2017, 07:57:27 AM
Quote from: davidhs on October 13, 2016, 04:53:08 PM
Quote from: SMiFFER on October 13, 2016, 04:28:05 PM
Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
I don't know... I will see.
That would really make it SUPERB then :D
Would you like to include this function?
Title: Re: Enhancements to purge inactive members
Post by: davidhs on January 31, 2017, 12:38:02 PM
Quote from: SMiFFER on January 31, 2017, 07:57:27 AM
Quote from: davidhs on October 13, 2016, 04:53:08 PM
Quote from: SMiFFER on October 13, 2016, 04:28:05 PM
Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
I don't know... I will see.
That would really make it SUPERB then :D
Would you like to include this function?
I will see but now I have not time, sorry :(
Title: Re: Enhancements to purge inactive members
Post by: davidhs on November 25, 2017, 12:08:19 PM
Compatible with SMF 2.0.14 and 2.0.15.
Title: Re: Enhancements to purge inactive members
Post by: davidhs on December 23, 2017, 08:25:02 AM
New version:
1.3.7   2017-12-19
------------------
+ SMF compatibility: 2.0.9-2.0.15 and 2.1 Beta 1 to Beta 3.
- Languages: spanish, spanish-utf8 (these are not used).
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on January 15, 2018, 11:16:37 AM
Quote from: davidhs on January 31, 2017, 12:38:02 PM
Quote from: SMiFFER on January 31, 2017, 07:57:27 AM
Quote from: davidhs on October 13, 2016, 04:53:08 PM
Quote from: SMiFFER on October 13, 2016, 04:28:05 PM
Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
I don't know... I will see.
That would really make it SUPERB then :D
Would you like to include this function?
I will see but now I have not time, sorry :(

How about now - more than 1 year later?
Title: Re: Enhancements to purge inactive members
Post by: Nirose on September 11, 2018, 01:31:47 AM
email Inactive Users (https://custom.simplemachines.org/mods/index.php?mod=3849) already does this well. Also it gives you a list of accounts for deletion. the problem with it is, it misses a lot of account chosen for deletion. So i'm looking for something new as well.
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on September 11, 2018, 10:05:44 AM
No, Nirose, you are wrong there. It does NOT do this well.

What it does is "send emails to inactive users and deletes them if they haven't logged in on the forum."
and that is clearly NOT what I requested. Would you please read my post above yours.

And you also gave reasons yourself in addition.
Title: Re: Enhancements to purge inactive members
Post by: aegersz on September 15, 2018, 03:14:48 AM
I also had problems so i wrote two php batch scripts that will send emails.

Don't set the "do_delete" flag and if you upload it to your web root then you will, by default, get a listing of who hasn't logged in since "n" number of days and whose account has never been logged into.

It shows you their post count also.

last_online_emailer.php

<?php
// SET THESE FIRST !
$servername "localhost";
$username "dbuser";
$password "dbpass";
$dbname "smf209";
$tbpref "smf209_";
$domain "forum.site-name.org";
$days_not_logged_in 365 // only those who have not not logged for 365 days or more
$do_email 0 // enable to send emails

$connect = new mysqli($servername$username$password$dbname);
if (
$connect->connect_error) {
        die(
"Connection failed: " $connect->connect_error);
}
$sql "SELECT * FROM" " " $tbpref "members ORDER BY last_login";
//$sql = "SELECT * FROM" . " " . $tbpref . "members WHERE member_name = 'test' ORDER BY last_login";
$result $connect->query($sql);
if (
$result->num_rows 0) {
        while(
$row $result->fetch_assoc()) {
                if (!empty(
$row["last_login"])) {
                        
$dateSin =  $row["last_login"];
                        
$current_date date("U"/* to have it in microseconds */;
                        
$your_month date("m"$dateSin);
                        
$your_day =  date("d"$dateSin);
                        
$your_year =  date("Y"$dateSin);
                        
$selected_date_stamp mktime(0,0,0,$your_month,$your_day,$your_year);
                        
$selected_date date("U",$selected_date_stamp);
                        
$difference round (($current_date $selected_date)/(3600*24));
if ($difference >= $days_not_logged_in) {
echo $row["member_name"] . " " $row["email_address"] . " " "posts=" $row["posts"] . " ";
echo "Last logged in" " " $difference " " "days ago" PHP_EOL;
        $to_member =  $row["member_name"];
        $from_name "SMF Administrator";
                        
$from_email "smfadmin@" $domain;
                        
$headers "From: $from_name <$from_email>";
                        
$body "Dear $to_member, \n
We miss you as you have not logged in to https://
$domain for over $difference days. \n
Please come and visit us soon! \n
Regards, \n
Server Admin"
;
         $subject "Regarding your last login";
         $to_email $row["email_address"];
         if ($do_email) {
         if (mail($to_email$subject$body$headers)) {
                 echo "email sent" " ";
       } else {
         echo "email failed" " ";
       }

                        }
                }
}
} else {
        echo 
"0 results";
}
$connect->close();
?>


never_online_emailer.php

<?php
// SET THESE FIRST !
$servername "localhost";
$username "dbuser";
$password "dbpass";
$dbname "smf209";
$tbpref "smf209_";
$domain "forum.site-name.org";
$days_since_registered 30;
$do_email 0 // enable to send emails
$do_delete 0// enable to remove members forcefully (NOT ADVISABLE as "Forum > Maintenance > Routine" repairs are required afterwards)

$connect = new mysqli($servername$username$password$dbname);
if (
$connect->connect_error) {
        die(
"Connection failed: " $connect->connect_error);
}
$sql "SELECT * FROM" " " $tbpref "members WHERE last_login = '0'";
//$sql = "SELECT * FROM" . " " . $tbpref . "members WHERE member_name = 'testr'";
$result $connect->query($sql);
if (
$result->num_rows 0) {
        while(
$row $result->fetch_assoc()) {
                
$datereg $row["date_registered"];
                
$current_date date("U"/* to have it in microseconds */;
                
$your_month date("m"$datereg);
                
$your_day date("d"$datereg);
                
$your_year =  date("Y"$datereg);
                
$selected_date_stamp mktime(0,0,0,$your_month,$your_day,$your_year);
                
$selected_date date("U",$selected_date_stamp);
                
$difference round (($current_date $selected_date)/(3600*24));
                if (
$difference >= $days_since_registered) {
                        echo 
$row["member_name"] . " " $row["email_address"] . " " "registered" " " $difference " " "days ago" PHP_EOL;
                        
$to_member =  $row["member_name"];
                        
$from_name "SMF Administrator";
                        
$from_email "smfadmin@" $domain;
                        
$headers "From: $from_name <$from_email>";
                        
$body "Dear $to_member, \n
You have never logged in to https://
$domain since you joined us so I will be removing you soon unless you do so. \n
I have already activated your account but both that email and your activation mail probably went to your spam folder. \n
If you have any questions or need any help on this matter then just reply to me. \n
Regards, \n
Server Admin"
;
                        
$subject "Regarding your inactive membership";
                        
$to_email $row["email_address"];
                        if (
$do_email) {
                                if (
mail($to_email$subject$body$headers)) {
                                        echo 
"email sent" " ";
                                } else {
                                        echo 
"email failed" " ";
                                }
                        }
                        if (
$do_delete) {
                                
$sql2 "DELETE FROM" " " $tbpref "members WHERE member_name = '$to_member' ";
                                if (
$connect->query($sql2) === TRUE) {
                                        echo 
"$to_member deleted successfully";
                                } else {
                                        echo 
"Error deleting record: " $connect->error;
                                }
                        }
                }
        }
} else {
        echo 
"0 results";
}
$connect->close();
?>
Title: Re: Enhancements to purge inactive members
Post by: davidhs on April 12, 2019, 12:09:43 PM
New version:
1.3.8   2019-04-05
------------------
! SMF 2.1.x: Use HTML 5.
+ SMF compatibility: 2.1 RC1 to RC2.
! SMF 2.1.x: Languages: Only UTF-8 languages are used.
Title: Re: Enhancements to purge inactive members
Post by: ysu on August 28, 2019, 11:08:48 PM
Hey mate, I've tried and installed this mod, but I see no change in the user list after using it.  We've got a bunch of spammers registered that I wanted to clear out - they've got a lot of dormant accounts with no posts - but nothing seems to have happened.
Title: Re: Enhancements to purge inactive members
Post by: davidhs on August 29, 2019, 04:58:13 AM
Quote from: ysu on August 28, 2019, 11:08:48 PM
Hey mate, I've tried and installed this mod, but I see no change in the user list after using it.  We've got a bunch of spammers registered that I wanted to clear out - they've got a lot of dormant accounts with no posts - but nothing seems to have happened.
What is your SMF version?
How do you fill fields before click on Remove now button.

Notes:
My mod add some enhancements to "Remove Inactive Members" section, but this section is in SMF core.
My mod, and this section, is not for delete spammers, only remove members with certain conditions.
Title: Re: Enhancements to purge inactive members
Post by: ysu on September 04, 2019, 12:35:38 AM
Quote from: davidhs on August 29, 2019, 04:58:13 AM
Quote from: ysu on August 28, 2019, 11:08:48 PM
Hey mate, I've tried and installed this mod, but I see no change in the user list after using it.  We've got a bunch of spammers registered that I wanted to clear out - they've got a lot of dormant accounts with no posts - but nothing seems to have happened.
What is your SMF version?
How do you fill fields before click on Remove now button.

Notes:
My mod add some enhancements to "Remove Inactive Members" section, but this section is in SMF core.
My mod, and this section, is not for delete spammers, only remove members with certain conditions.

SMF 2.0.15
I've filled the fields with "logical" criteria; users with 0 posts.
I've tried to play with the 1st option eg 'been registered more than 30 days' but to no avail.

Not that big a deal, we don't get that many spam regos, only 50 or so in backlog, I just thought it might be simpler to batch-rid of them.

Having said that I've tried it with trepidation; it maybe hard to double-check what has happened, afterwards.  This is really not my preferred function, just a 'next best' thing.   I really wish someone with time would create a mod to click the users in the user list and mass-ban them; that'd be a far nicer solution.   Funnily enough, even though spammers seem to be a common problem, nobody though of doing it, sadly.

Anyway, don't bother yourself with it, I'll just get through them manually.
Title: Re: Enhancements to purge inactive members
Post by: davidhs on September 05, 2019, 01:41:41 PM
Quote from: ysu on September 04, 2019, 12:35:38 AM
Quote from: davidhs on August 29, 2019, 04:58:13 AM
Quote from: ysu on August 28, 2019, 11:08:48 PM
Hey mate, I've tried and installed this mod, but I see no change in the user list after using it.  We've got a bunch of spammers registered that I wanted to clear out - they've got a lot of dormant accounts with no posts - but nothing seems to have happened.
What is your SMF version?
How do you fill fields before click on Remove now button.

Notes:
My mod add some enhancements to "Remove Inactive Members" section, but this section is in SMF core.
My mod, and this section, is not for delete spammers, only remove members with certain conditions.

SMF 2.0.15
I've filled the fields with "logical" criteria; users with 0 posts.
I've tried to play with the 1st option eg 'been registered more than 30 days' but to no avail.

Not that big a deal, we don't get that many spam regos, only 50 or so in backlog, I just thought it might be simpler to batch-rid of them.

Having said that I've tried it with trepidation; it maybe hard to double-check what has happened, afterwards.  This is really not my preferred function, just a 'next best' thing.   I really wish someone with time would create a mod to click the users in the user list and mass-ban them; that'd be a far nicer solution.   Funnily enough, even though spammers seem to be a common problem, nobody though of doing it, sadly.

Anyway, don't bother yourself with it, I'll just get through them manually.

Did you test these mods?
StopSpammer, https://custom.simplemachines.org/mods/index.php?mod=1547
httpBL, https://custom.simplemachines.org/mods/index.php?mod=2155
Title: Re: Enhancements to purge inactive members
Post by: davidhs on March 05, 2020, 10:09:19 AM
Compatible with SMF 2.0.16 and 2.0.17.
Title: Re: Enhancements to purge inactive members
Post by: Belgarathh on May 02, 2020, 12:27:19 PM
Hi davidhs

Using this mod, could I set up the following:

I want to delete members with zero posts who have not logged in for 365 days (both conditions must be met)
Title: Re: Enhancements to purge inactive members
Post by: davidhs on May 02, 2020, 01:22:23 PM
Quote from: Belgarathh on May 02, 2020, 12:27:19 PM
I want to delete members with zero posts who have not logged in for 365 days (both conditions must be met)
You can do this:
QuoteRemove all members who have not logged in for 365 days.
Remove members who have 0 posts or less (empty = any number)
...
(all conditions must be true)
Title: Re: Enhancements to purge inactive members
Post by: Belgarathh on May 02, 2020, 06:13:54 PM
Quote from: davidhs on May 02, 2020, 01:22:23 PM
Quote from: Belgarathh on May 02, 2020, 12:27:19 PM
I want to delete members with zero posts who have not logged in for 365 days (both conditions must be met)
You can do this:
QuoteRemove all members who have not logged in for 365 days.
Remove members who have 0 posts or less (empty = any number)
...
(all conditions must be true)

Perfect.  THANK YOU
Title: Re: Enhancements to purge inactive members
Post by: Bugo on June 27, 2020, 04:41:59 AM
Updated the Russian translation
Title: Re: Enhancements to purge inactive members
Post by: davidhs on June 27, 2020, 07:21:09 AM
Quote from: Bugo on June 27, 2020, 04:41:59 AM
Updated the Russian translation
Thank you! I add in next update.
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on August 22, 2020, 03:22:22 AM
Please add the following options: Remove all members who have ...... 

- not logged in (for x days) (a)
- not made any post (for x days) (b)

That data is easily visible on
a) Summary Page (https://www.simplemachines.org/community/index.php?action=profile;u=242014)
b) Show Posts Page (https://www.simplemachines.org/community/index.php?action=profile;area=showposts;u=242014)

And send those users a "good-bye for inactivity" message

Please do not alter the title of a reply in a mod support topic.  Title reverted - Iris.
Title: Re: Enhancements to purge inactive members
Post by: shadav on August 22, 2020, 10:36:08 AM
Quote from: SMiFFER on August 22, 2020, 03:22:22 AM
Please add the following options: Remove all members who have ...... 

- not logged in (for x days) (a)
- not made any post (for x days) (b)

That data is easily visible on
a) Summary Page (https://www.simplemachines.org/community/index.php?action=profile;u=242014)
b) Show Posts Page (https://www.simplemachines.org/community/index.php?action=profile;area=showposts;u=242014)

And send those users a "good-bye for inactivity" message

Please do not alter the title of a reply in a mod support topic.  Title reverted - Iris.

it would be nice to be added, however there is a mod that will email and/or delete inactive users > https://custom.simplemachines.org/mods/?mod=3849
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on September 14, 2020, 01:12:19 PM
*sigh*It is like you are being deliberately dense or do not WANT to understand me.
I asked for
> - not made any post (for x days)
which is clearly neither part of the other mod. I wrote this to you before and already there you ignored it.
Are you doing this intentionally or have I overread something?
Title: Re: Enhancements to purge inactive members
Post by: shadav on September 20, 2020, 10:12:59 PM
Quote from: SMiFFER on September 14, 2020, 01:12:19 PM
*sigh*It is like you are being deliberately dense or do not WANT to understand me.
I asked for
> - not made any post (for x days)
which is clearly neither part of the other mod. I wrote this to you before and already there you ignored it.
Are you doing this intentionally or have I overread something?

well excuse me for trying to help but you did also ask for

Quote from: SMiFFER on August 22, 2020, 03:22:22 AM
- not logged in (for x days) (a)
which is what the mod that I tried to show you does....but hey if you don't want to use it, that's up to you....no need to be rude

and I have no idea what you are even talking about
Quote from: SMiFFER on September 14, 2020, 01:12:19 PM
I wrote this to you before and already there you ignored it.
Are you doing this intentionally or have I overread something?
Title: Re: Enhancements to purge inactive members
Post by: shawnb61 on September 20, 2020, 10:25:04 PM
Thanks for pitching in, shadav, it's appreciated. :)  By most. ::)
Title: Re: Enhancements to purge inactive members
Post by: shadav on September 20, 2020, 10:37:11 PM
Quote from: shawnb61 on September 20, 2020, 10:25:04 PM
Thanks for pitching in, shadav, it's appreciated. :)  By most. ::)
:) thanks... I try anyways
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on September 30, 2020, 05:48:11 AM
Once again, YOU * ARE * WRONG!

You solve only 50% of the problem - and prove that you deliberately ignore the other half.
I know what I asked, I asked:

- not made any post (for x days) (b)

The mod you mention does * NOT * do that.

Thanks
Title: Re: Enhancements to purge inactive members
Post by: shadav on September 30, 2020, 11:28:59 AM
Quote from: SMiFFER on September 30, 2020, 05:48:11 AM
Once again, YOU * ARE * WRONG!

You solve only 50% of the problem - and prove that you deliberately ignore the other half.
I know what I asked, I asked:

- not made any post (for x days) (b)

The mod you mention does * NOT * do that.

Thanks
ok and...???
I proved a mod that does one of your requests....so now you only have one request left
I don't understand your issue
no it's not a it does everything, but it did solve one of your requests....that's one step closer to what you want...
but again, if you don't want to use it that's up to you...
best of luck
Title: Re: Enhancements to purge inactive members
Post by: SMiFFER on February 05, 2021, 05:18:25 AM
Very well... 50% is at least more than nothing.

In so far you are of course right.

Looking forward, maybe you find the time & leisure to program the other half, too.
Title: Re: Enhancements to purge inactive members
Post by: davidhs on February 13, 2021, 04:43:48 PM
About some enhancement requests in the past about send emails, move users to groups, or convert this mod in a scheduled task...
Quote from: ElectricSquid on July 09, 2011, 10:48:37 PM
This would be a GREAT scheduled task!!

Purge all members with 0 posts in 60 days.[...]
Quote from: iain sherriff on February 16, 2014, 01:51:17 PM
Can this be altered to move selected members to a specific membergroup inplace of deleting them ?
Quote from: SMiFFER on October 13, 2016, 04:28:05 PM
Could you include a function to remind/auto-purge members that have not posted since x days ?
and others...

Sorry, finally I will not add anything about these requests. :( This mod is created only for add conditions for the search of users, not actions to apply on the users found.

Of course, if you need another condition in the search of users to remove, fell free to request it here. ;)




Quote from: Bugo on June 27, 2020, 04:41:59 AM
Updated the Russian translation
Added! :)



New version:
1.3.9   2021-02-13
------------------
! SMF 2.0.x: Do not use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.16-2.0.18 and 2.1 RC3.
+ Languages: New language string in russian, russian-utf8, thanks to Bugo.
Title: Re: Enhancements to purge inactive members
Post by: loki66 on November 28, 2021, 05:35:47 PM
Its not working for me - despite it says so, none users are deleted - maybe because they are too old ?  Please advise
Title: Re: Enhancements to purge inactive members
Post by: Steve on November 29, 2021, 09:19:27 AM
What settings did you use?
Title: Re: Enhancements to purge inactive members
Post by: Marina3 on November 04, 2023, 12:15:26 PM
Will the mod work on SMF 2.1.4?