Expire Unactivated Users by Timeframe

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
11
58%
Very Good
8
42%
Good
0
No votes
Fair
0
No votes
Poor
0
No votes
 
Total votes: 19

rscyp
Registered User
Posts: 2
Joined: Wed May 16, 2007 4:20 pm

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by rscyp » Wed May 16, 2007 4:30 pm

I've installed the 2.0 but i don't have the automation working. I don't know where to add the following code. Could you please explain or point me in the right direction? I love what i have so far but now would like to have it automated so i don't have to do it. thanks!!!

#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config ( config_name, config_value ) VALUES ('expire_automation_enable', '0');...

thanks for the help. 8O

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by IPB_Refugee » Wed May 16, 2007 6:23 pm

Hi,

that is a SQL query which changes the data base a bit. You can run the query via phpMYAdmin or a similar tool:

http://www.phpmyadmin.net/home_page/docs.php

Regards
Wolfgang

rscyp
Registered User
Posts: 2
Joined: Wed May 16, 2007 4:20 pm

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by rscyp » Wed May 16, 2007 7:36 pm

Thanks for pointing me in the right direction. I had forgotten about phpMYAdmin but with your help i've run the sql statements and all it good. thanks for the help. :D

harknell
Registered User
Posts: 39
Joined: Mon Mar 14, 2005 12:08 am
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by harknell » Wed May 16, 2007 10:11 pm

Thank you IPB_Refugee for stepping in and helping out with the info, it's appreciated.
Webmaster of the webcomic http://www.onezumi.com
The Art, The Comic, The Insanity

LoOoD
Registered User
Posts: 43
Joined: Tue Sep 24, 2002 6:47 am

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by LoOoD » Sat May 26, 2007 1:07 am

How about an option to delete all unactivated users w/ no time frame :).. I suppose you would only use it once the first time you install this but yeah.

User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by Martin Truckenbrodt » Sat May 26, 2007 10:42 am

LoOoD wrote:How about an option to delete all unactivated users w/ no time frame :).. I suppose you would only use it once the first time you install this but yeah.
Hello,
http://www.phpbb.com/community/viewtopic.php?t=438074

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!

harknell
Registered User
Posts: 39
Joined: Mon Mar 14, 2005 12:08 am
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by harknell » Sat May 26, 2007 1:44 pm

The design idea of making the lowest setting one hour in the past was to prevent deleting legitimate users that may have just signed up to your forum in the last few minutes from being deleted before they could get to the link in their email to activate their registration. It would be unfortunate to do that, especially if you have a very active forum.
If someone can't get to their email and activate within an hour that's usually only an indication it's a spammer. One hour is so small a time frame really that I do mark it as practically immediate in the listing. Of course if you are being bombarded by thousands of spammers per hour I think you may have more problems than this mod could help :)

I'm always willing to make additions to the mod though, so suggestions are welcome. (and note that the 2.0.0 version of the mod is only available from my site at the moment since the mod database isn't up yet, go to awsom.org to get the automated version of the mod)
Webmaster of the webcomic http://www.onezumi.com
The Art, The Comic, The Insanity

User avatar
afarber
Registered User
Posts: 24
Joined: Tue Dec 06, 2005 6:28 pm
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by afarber » Thu Aug 09, 2007 9:51 am

Doesn't work with PostgreSQL:

Code: Select all

phpbb=> SELECT user_id FROM phpbb_users WHERE (user_active = 0) and (user_id <>-1) and (user_lastvisit = 0) and (user_regdate < "1186045406") ;

ERROR:  column "1186045406" does not exist
I think you should change the double quotes to single quotes

Nytewind
Registered User
Posts: 13
Joined: Tue Feb 14, 2006 5:01 am
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by Nytewind » Sun Aug 12, 2007 7:46 pm

Props on this mod. I am totally loving it.

elkay
Registered User
Posts: 1
Joined: Mon Oct 25, 2004 7:33 pm

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by elkay » Mon Aug 20, 2007 2:17 pm

Thanks so much for this!!

Nothing is easy
Registered User
Posts: 173
Joined: Sun Apr 02, 2006 1:10 am

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by Nothing is easy » Tue Oct 16, 2007 2:40 am

Couple of questions:

1) Does this delete just (or can it be limited to) users who are not activated and whose post count is zero?
2) If the userid being deleted is also in the banned user list is the userid also removed from there too?

Reasons for asking are that for some reason I believe that users can go to not activated if they change their email address in their profile. Also I have added inactivated users to my ban list that were spammers mainly to prevent them from activating and posting or from using the same email address again which deleting them would have allowed. However, there comes a point where I am happy to finally remove them.

User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by Martin Truckenbrodt » Tue Oct 16, 2007 11:11 am

Nothing is easy wrote:2) If the userid being deleted is also in the banned user list is the userid also removed from there too?
Hello,
just test it without the MOD!
Create a test account. Ban the user(name). Delete the user. Look the the ban list.

At least in phpBB3 the ban entry will be deleted automatically if you use the function user_delete(...) .

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!

Nothing is easy
Registered User
Posts: 173
Joined: Sun Apr 02, 2006 1:10 am

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by Nothing is easy » Tue Oct 16, 2007 5:30 pm

Martin Truckenbrodt wrote:
Nothing is easy wrote:2) If the userid being deleted is also in the banned user list is the userid also removed from there too?
Hello,
just test it without the MOD!
Create a test account. Ban the user(name). Delete the user. Look the the ban list.
Using the delete function from within the User Admin Management panel does remove the userid from the ban list. However, that does not necessarily mean to say that this mod deletes users in the same way as the User Management delete function does it?

So my question regarding what does this mod do still stands - as does my question does this delete just (or can it be limited to) users who are not activated and whose post count is zero?

User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by Martin Truckenbrodt » Tue Oct 16, 2007 6:02 pm

Hello,
let's have a look to the code.
admin_expire_unactivated.php:

Code: Select all

...
				$thisuseridrow = $db->sql_fetchrow($thisuseridresult);
				$sql = "DELETE FROM " . USERS_TABLE . "
								WHERE user_id = $user_id";
							if( !$db->sql_query($sql) )
							{
								message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql);
							}
				
							$sql = "DELETE FROM " . USER_GROUP_TABLE . "
								WHERE user_id = $user_id";
							if( !$db->sql_query($sql) )
							{
								message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql);
							}
				
							$sql = "DELETE FROM " . GROUPS_TABLE . "
								WHERE group_id = " . $thisuseridrow['group_id'];
							if( !$db->sql_query($sql) )
							{
								message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql);
							}
				$db->sql_freeresult($thisuseridresult);			
...
So the MOD doesn't delete the ban entry. That's not good!

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!

harknell
Registered User
Posts: 39
Joined: Mon Mar 14, 2005 12:08 am
Contact:

Re: [11/02/07] Expire Unactivated Users by Timeframe

Post by harknell » Thu Nov 08, 2007 3:36 am

Sorry for not being super active on the forum recently, I've mostly been working on Wordpress stuff and this mod area wasn't updated for a long time.

Ok, let me see here. This mod is designed and limited to deleting people who have an unactivated account and NEVER activated it. This is on purpose to prevent users who may have temporarily been deactivated from being deleted by the mod.

While I can imagine that you might decide to ban a user who never activated their account, this seems a bit weird to me since how would you know they were a spammer if they never posted anything (since presumably you don't allow non-activated user to post to the forum). So anyone on a banned list is almost certainly normally going to be an activated user at some point, so the mod doesn't apply to them and wouldn't delete them by design. The mod is mostly designed to blow away in one shot the large numbers of spammer registrations that get done all the time by bots but never get activated.

I'll probably post the 2.0 version for publication now that things have returned to normal here.
Webmaster of the webcomic http://www.onezumi.com
The Art, The Comic, The Insanity

Post Reply

Return to “[2.0.x] MOD Database Releases”