[ABD] Delete Inactive Users

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
mr.ruf
Registered User
Posts: 136
Joined: Thu Apr 04, 2013 11:12 pm
Location: PuErTo RiCo
Name: Harold
Contact:

Re: [DEV] Delete Inactive Users

Post by mr.ruf » Tue Nov 04, 2014 8:37 pm

oh oh oh..... ok , is another extension thanks i try now :lol:

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Delete Inactive Users

Post by John P » Tue Nov 04, 2014 8:38 pm

Unpack the zip and copy all files and folders where you find composer.json to the destination folder on your webserver.
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

User avatar
Raul [ThE KuKa]
Jr. Extension Validator
Posts: 4173
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [DEV] Delete Inactive Users

Post by Raul [ThE KuKa] » Tue Nov 04, 2014 8:48 pm

"PR" translation spanish ready. ;)
Last edited by Raul [ThE KuKa] on Tue Nov 04, 2014 10:34 pm, edited 1 time in total.
If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
phpBB International Support Team (Spanish - Español) :flag_es: Online Since 2003 - 15th anniversary
🎨phpBB Professional Premium Themes🔥
Author Translations (Spanish - Spain) :two_hearts:

:warning: I don't support those without the copyright Spanish translation. :warning:

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Delete Inactive Users

Post by John P » Tue Nov 04, 2014 9:50 pm

Thanks raul
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

User avatar
mr.ruf
Registered User
Posts: 136
Joined: Thu Apr 04, 2013 11:12 pm
Location: PuErTo RiCo
Name: Harold
Contact:

Re: [DEV] Delete Inactive Users

Post by mr.ruf » Tue Nov 04, 2014 10:51 pm

another question how i install "extension upload" ? no find any instruction to this

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Delete Inactive Users

Post by John P » Tue Nov 04, 2014 11:10 pm

Did you read readme.md?

1.Download the extension. You can do it directly by downloading the latest ZIP-archive of master branch of its GitHub repository.
2.Check out the existing of the folder /ext/boardtools/upload/ in the root of your board folder. Create folders if necessary.
3.Copy the contents of the downloaded upload-master folder to /ext/boardtools/upload/ .
4.Navigate in the ACP to Customise -> Extension Management -> Manage extensions -> Upload Extensions .
5.Click Enable .
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

leschek
Registered User
Posts: 779
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [DEV] Delete Inactive Users

Post by leschek » Tue Nov 04, 2014 11:17 pm

Is this start working when I enable the extension in customise tab, or after I click "Submit" button in "Board features" settings?

User avatar
mr.ruf
Registered User
Posts: 136
Joined: Thu Apr 04, 2013 11:12 pm
Location: PuErTo RiCo
Name: Harold
Contact:

Re: [DEV] Delete Inactive Users

Post by mr.ruf » Wed Nov 05, 2014 2:31 am

thank you very much, I followed all the instructions and install the extension using "extension upload", it was very easy :D

User avatar
mr.ruf
Registered User
Posts: 136
Joined: Thu Apr 04, 2013 11:12 pm
Location: PuErTo RiCo
Name: Harold
Contact:

Re: [DEV] Delete Inactive Users

Post by mr.ruf » Wed Nov 05, 2014 2:41 am

I have other questions to clear my doubts and benefit others I'm sure have the same doubts.

1. will be deleted users to register and (using an example) in 30 days at no time have connected?

but ...

2. will be deleted users who are inactive for 30 days even though they were once connected?

(I mean were reported entered and commented on the topics of the forum and then remained inactive for 30 days) they are removed too?

Thanks for being patient with me and help me in this matter

Holger
Registered User
Posts: 1603
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [DEV] Delete Inactive Users

Post by Holger » Wed Nov 05, 2014 8:40 am

Swedish translation

BTW, you have a typo in the English lang-file
Are you looking for a phpBB Expert? Find a phpBB Expert!
Are you a phpBB Expert? Post your resume!
http://www.phpbbexperts.com

User avatar
Walther
Registered User
Posts: 266
Joined: Fri Jul 09, 2004 5:21 pm
Location: The Netherlands

Re: [DEV] Delete Inactive Users

Post by Walther » Thu Nov 06, 2014 1:50 pm

Walther wrote:So, only those who are member of the "newly registered users group", not members de-activated by the admin with 0 postings due to *whatever reason* the admin had to de-activate them.
WHAAA!!!
All users who where made inactive for good reasons, but we did not want to delete them, DELETED!!!!
Crap, not going to use this extension any more, now finding out how to restore backup, as that does not seem to work from the ACP :evil:

-------------------------------------------

EDIT: It's 5 hour's later, had the database restored, but forgot that in the database backup the extension was still enabled.
So when i went to the ACP, all the users are AGAIN deleted, whether they where in the newly registered group or not, being de-activated was enough.

So now, waiting for mysqldump to finish the restore of over 5 million records, i dived into the code.
Think there is a 'error', or at least, vague part in the code.

Code: Select all

$sql = 'SELECT user_id, username, user_regdate FROM ' . USERS_TABLE . ' WHERE user_type = ' . USER_INACTIVE . ' AND user_new = 1 AND user_regdate < ' . $expire_date; 
Concerning the AND user_new = 1 part, Should dat not be better "1" or still beter (but don't know for the moment if it is boolean) just TRUE or FALSE ?
On our mySQL server, users who had serveral postings but where placed inactive by the admin where simply deleted, so the user_new was not checked properly.

User avatar
mr.ruf
Registered User
Posts: 136
Joined: Thu Apr 04, 2013 11:12 pm
Location: PuErTo RiCo
Name: Harold
Contact:

Re: [DEV] Delete Inactive Users

Post by mr.ruf » Sun Nov 09, 2014 7:51 pm

well I think this extension desactivare for now, until we get a new update, but I'm still very interested :D

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Delete Inactive Users

Post by John P » Mon Nov 10, 2014 11:47 am

user_new is a integer so that's ok.
user_new is set to 0 if the user is removed from the NRG so it won't delete inactive users who once where active.
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

User avatar
Walther
Registered User
Posts: 266
Joined: Fri Jul 09, 2004 5:21 pm
Location: The Netherlands

Re: [DEV] Delete Inactive Users

Post by Walther » Mon Nov 10, 2014 6:09 pm

John P wrote:... it won't delete inactive users who once where active
ALL users who where not active or de-activated, with or without postings, pm's and so on, got deleted :idea:
I'm not kidding!

I adapted the query to be able to run it straight in phpMyAdmin, the user_type of inactive users = 1 on our board, don't know if that differs from board to board.

When I run the following (adapted: variables are hard coded) query in phpMyAdmin, all users who are inactive get selected:
SELECT user_id, username, user_regdate FROM phpbb3_users WHERE user_type = 1 AND user_new = 1;

Even those users who are *NOT* in the "Newly registered users" group, the value of them is 1 in the field user_new

HOWEVER:
When I run the test query with one extra variable, it works: user_inactive_reason
SELECT user_id, username, user_regdate FROM phpbb3_users WHERE user_type = 1 AND user_new = 1 AND user_inactive_reason = 1;

The following list seems to apply for user_inactive_reason:
  • 0 = nothing, user is not inactive
    1 = Newly registered account
    2 = Profile details changed
    3 = Account deactivated by administrator
    4 = Forced user account reactivation
So, be on the safe site, or make it even more configurable, but my suggestion is to change the query:
$sql = 'SELECT user_id, username, user_regdate FROM ' . USERS_TABLE . ' WHERE user_type = ' . USER_INACTIVE . ' AND user_new = 1 AND user_regdate < ' . $expire_date;
into:
$sql = 'SELECT user_id, username, user_regdate FROM ' . USERS_TABLE . ' WHERE user_type = ' . USER_INACTIVE . ' AND user_new = 1 AND user_inactive_reason = 1 AND user_regdate < ' . $expire_date;

Maybe skip the whole user_new part, because sometimes even when the users have the required number of postings, they are still listed in the newly registered group, until their postings is required+1.

edit: found reason #4 for user_inactive_reason
And a shorter SQL doing the exact same could be:
$sql = 'SELECT user_id, username, user_regdate FROM ' . USERS_TABLE . ' WHERE user_inactive_reason = 1 AND user_regdate < ' . $expire_date;

leschek
Registered User
Posts: 779
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [DEV] Delete Inactive Users

Post by leschek » Tue Nov 11, 2014 6:49 pm

Walther wrote:ALL users who where not active or de-activated, with or without postings, pm's and so on, got deleted :idea:
Unfortunately it's true. I just tested it on testing board converted from phpBB 3.0.x. I deactivated user who was member since 2006 and have 1 post. Next day he was deleted. It even didn't wait for 30 days I set in "Delete inactive users:" option.

Locked

Return to “Abandoned Extensions”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests