Advertisement:

Author Topic: Delete Unactivated Members  (Read 1281 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Delete Unactivated Members
« on: November 23, 2017, 11:59:31 AM »
Link to Mod


DELETE UNACTIVATED MEMBERS v1.4
By Dougiefresh -> Link to Mod


Introduction
One day, I looked at my forum and saw that 9,870 out of 14,776 were unactivated, most of them over 1 year old.  This irritated me, so I wrote this mod to automatically remove members who haven't activated their account after a specified number of days.  There is also an option to email users that their membership has been deleted due to lack of activation of the membership.

Please note that this mod does not set the number of days setting initially.  You must do this in order for this mod to function.  I recommend 30 days, however, you can set it to whatever you want.

Admin Settings
In Admin => Members => Registration => Settings, there are 2 new settings:
o Days before unactivated accounts are deleted
o Notify users whose accounts are being deleted?

Compatibility Notes
This mod was tested on SMF 2.0.14 and SMF 2.1 Beta 3, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported.

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Quote
Copyright (c) 2017, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 4,576
  • Gender: Male
    • i30 Owners Club
Re: Delete Unactivated Members
« Reply #1 on: November 23, 2017, 12:12:40 PM »
Sounds useful. If it could optionally email the registrant too, that would be very useful.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Delete Unactivated Members
« Reply #2 on: November 23, 2017, 12:17:34 PM »
Uploaded v1.1 - November 23th, 2017
o Added support for SMF 2.0 Beta 3.



@sǝๅqɯɐɥS:  Well, I could add that into the code.  However, I assume that most of the member emails whom I'm deleting are fake.  Judging from the sampling of email addresses I saw on my own forum, this is probably the case.  But I'll see what I can do about adding such code...
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Delete Unactivated Members
« Reply #3 on: November 24, 2017, 08:44:08 PM »
Uploaded v1.2- November 24th, 2017
o Added code & option to send emails to users we are deleting.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: Delete Unactivated Members
« Reply #4 on: November 26, 2017, 12:53:57 AM »
This is a great addition. I've always wondered why SMF didn't have this built in already. The forum software I used before SMF hadit and it was quite helpful.

Thanks for bringing this to SMF.

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: Delete Unactivated Members
« Reply #5 on: November 26, 2017, 12:57:40 AM »
I noticed that the text "Notify users whose accounts are being deleted?" does not appear next to the tick box.

Offline Colin

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,791
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Delete Unactivated Members
« Reply #6 on: November 26, 2017, 05:05:13 AM »
Uploaded v1.1 - November 23th, 2017
o Added support for SMF 2.0 Beta 3.



@sǝๅqɯɐɥS:  Well, I could add that into the code.  However, I assume that most of the member emails whom I'm deleting are fake.  Judging from the sampling of email addresses I saw on my own forum, this is probably the case.  But I'll see what I can do about adding such code...


I think you mean 2.1

Nice mod!
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Rock Lee

  • Sophist Member
  • *****
  • Posts: 1,211
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Delete Unactivated Members
« Reply #7 on: November 26, 2017, 08:47:03 AM »
This is good to use but lately I have many registered users but not activated but without a couple of spam bots. As usual, the translation into normal Latin Spanish and utf-8.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2017
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Delete Unactivated Members
« Reply #8 on: November 26, 2017, 10:03:51 PM »
Uploaded v1.3 - November 26th, 2017
o Added Spanish Latin translation, courtsey of Rock Lee!



@Rock Lee:  Thank you for the translation!  It's been included in this version!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: Delete Unactivated Members
« Reply #9 on: November 29, 2017, 09:37:23 PM »
I noticed that the text "Notify users whose accounts are being deleted?" does not appear next to the tick box.

Just seeing if you missed this.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Delete Unactivated Members
« Reply #10 on: November 29, 2017, 11:19:38 PM »
@Rock Lee:  Can you translate the following string for me for both language files?
Code: [Select]
$txt['DUMD_notify_users'] = 'Notify users whose accounts are being deleted?';Thanks!

I noticed that the text "Notify users whose accounts are being deleted?" does not appear next to the tick box.
Just seeing if you missed this.
::) Obviously I did, not once but twice....  Waiting for Rock Lee for a translation of the string....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Rock Lee

  • Sophist Member
  • *****
  • Posts: 1,211
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Delete Unactivated Members
« Reply #11 on: November 30, 2017, 07:30:00 AM »
@Rock Lee:  Can you translate the following string for me for both language files?
Code: [Select]
$txt['DUMD_notify_users'] = 'Notify users whose accounts are being deleted?';Thanks!

It was not converted ... how strange ::)

Code: (spanish_latin) [Select]
$txt['DUMD_notify_users'] = '¿Notificar a los usuarios cuyas cuentas se están eliminando?';
and

Code: (spanish_latin-utf8) [Select]
$txt['DUMD_notify_users'] = '¿Notificar a los usuarios cuyas cuentas se están eliminando?';
Here I leave the translated lines :D

I noticed that the text "Notify users whose accounts are being deleted?" does not appear next to the tick box.
::) Obviously I did, not once but twice....  Waiting for Rock Lee for a translation of the string....

Point to my oversights of code, it may be that transports me to the other side of the window the translation to the right on this side :-[ ... :laugh: but with that should be anything you tell me and I translate it with pleasure.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2017
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Delete Unactivated Members
« Reply #12 on: November 30, 2017, 10:24:58 AM »
Uploaded v1.4 - November 30th, 2017
o Fixed language files so that missing string comes up on configuration pages.



@Rock Lee:  No, it seems there is no oversight on your part....  The translation is there, just not under the right string....   :-[
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Rock Lee

  • Sophist Member
  • *****
  • Posts: 1,211
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Delete Unactivated Members
« Reply #13 on: November 30, 2017, 01:30:22 PM »
@dougiefresh I always check that everything is in order, I never have a problem, it could be my hand and I erase just part of the variable ... well, I am human I can miss this errata, they will say, I also apologize I will pay more attention to the next one ;)!

Quote
An erratum or corrigendum (plurals: errata, corrigenda) (comes from Latin: errata corrige) is a correction of a published text. As a general rule, publishers issue an erratum for a production error (i.e., an error introduced during the publishing process) and a corrigendum for an author's error.[1]

An erratum is most commonly issued shortly after its original text is published. Patches to security issues in a computer program are also sometimes called errata.

https://en.wikipedia.org/wiki/Erratum


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2017
Ayudas - Aportes - Tutoriales - Y mucho mas!!!