cleanup ghost users?

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
qnx
Registered User
Posts: 69
Joined: Fri Mar 28, 2003 6:03 am

cleanup ghost users?

Post by qnx » Fri Oct 08, 2004 3:14 am

My forum is setup to do "two-stage" registration. User has to check their email and come back to complete the registration. Some users never come back to complete due to various reasons (used faked email address, or the email got lost during transmit). After a few years, I have quite some such "ghost" users. Can anybody provide a sql script that I can use to cleanup/remove those users?
Thanks!

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Fri Oct 08, 2004 3:29 am

That would be hard to do, as you are obviously using some kind of modification to do the two stage registration process, scince phpBB does not work this way by defualt. We do not know the modifications therefore cannot tell you how to change it.

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Post by pentapenguin » Fri Oct 08, 2004 3:32 am

Do you mean you just have the account activation set to user? (i.e. no MODs?)
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

qnx
Registered User
Posts: 69
Joined: Fri Mar 28, 2003 6:03 am

Post by qnx » Fri Oct 08, 2004 3:54 am

pentapenguin wrote: Do you mean you just have the account activation set to user? (i.e. no MODs?)


right. no MODs. just "activation" to "user".

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Fri Oct 08, 2004 4:12 am

Here is a SQL querry. There is a tricky bit though. You need to replace the question marks with a unix timestamp that represents the 30 days ago:

Code: Select all

DELETE FROM phpbb_users WHERE `user_active` = 0 AND `user_id` != -1 AND `user_regdate` < ?????;

User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Post by AdamR » Fri Oct 08, 2004 4:20 am

There is also a more controlable MOD for this:
http://www.phpbb.com/phpBB/viewtopic.php?t=15812

- Adam
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton

Locked

Return to “2.0.x Support Forum”