[ABD] - About Delete Inactive User Timer MOD

Any abandoned MODs will be moved to this forum.

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

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
robra
Registered User
Posts: 147
Joined: Thu Dec 09, 2010 2:09 am
Location: Brazil

[ABD] - About Delete Inactive User Timer MOD

Post by robra » Tue Jun 14, 2011 2:00 pm

The author page of this MOD in http://www.phpbb.com/community/viewtopi ... 1&start=15 is locked because the download link is broken and because the author not reply to the messages since 30 Jan 2011.
Well, this MOD really is a code addition in the end of the root/common.php file. It's very simple to do that.
Follow the steps below:
1- Make backup of the root/common.php file to restore it if you have some problem.
2- Open the common.php file and in the end, before of the code ?>, include this code:

Code: Select all

// Append at the end of common.php in the root directory of your phpBB installation.

// Don't mess with these variables.
// Use these as referances to how long this site should keep a newly registered user that is inactive.
$timespan_minute = 60;				// 1 minute
$timespan_hour = 60 * $timespan_minute;		// 1 hour
$timespan_day = 24 * $timespan_hour;		// 1 day
$timespan_week = 7 * $timespan_day;		// 1 week
$timespan_month = 30 * $timespan_day;		// 1 month
$timespan_year = 365 * $timespan_day;		// 1 year

// Change this variable to anything you want!
// A value under 5 minutes is not recomended.
// Use above variables as referance.
$delete_user_time = 24 * $timespan_hour;	// 24 hours is default!

$usercheck_time = time();
$sql_usercheck = "SELECT * FROM " . USERS_TABLE . " WHERE user_inactive_reason='1' ";
$result_usercheck = $db->sql_query($sql_usercheck);
while($row_usercheck = $db->sql_fetchrow($result_usercheck))
{
	$user_id = $row_usercheck['user_id'];
	$user_inactive_time = $row_usercheck['user_inactive_time'];
	$user_regdate = $row_usercheck['user_regdate'];
	
	if($user_inactive_time == $user_regdate and $usercheck_time > $user_inactive_time + $delete_user_time)
	{
		$sql_usercheck_remove = "DELETE FROM " . USERS_TABLE . " WHERE user_inactive_time='$user_inactive_time' ";
		$result_usercheck_remove = $db->sql_query($sql_usercheck_remove);
	}
}
3- Salve it and do the uplod of it.

P.S.:
- This MOD is to automatically exclude only the users that created a register in Forum but they never activated the register.
- This MOD is indicate to the Fórum that is configurated with the option "User" in the GENERAL tab>>User registation settings
- The "default time" to auto exclude the inactive user is 24 hours after create your register in Forum. Is not indicate to use a time under of 5 minutes.
If you want to change the "default time", then, change the hours in the line:

Code: Select all

$delete_user_time = 24 * $timespan_hour;	// 24 hours is default!
Exemple:
Suppose that you want to exclude auto the inactive user that created a register in the Forum but not activated the register in 3 days. Then, you can do it this way:

Code: Select all

$delete_user_time = 72 * $timespan_hour;	// 24 hours is default!
Or this way:

Code: Select all

$delete_user_time = 3 * $timespan_day;  // 24 hours is default!
I hope to have helped.
Last edited by robra on Tue Jul 26, 2011 7:20 pm, edited 2 times in total.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20089
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: About Delete Inactive User Timer MOD

Post by RMcGirr83 » Tue Jul 26, 2011 6:43 pm

Hello,

Please edit your topic title with a prefix as outlined in Modifications Development Forum Rules, section 3a. This will allow people to see the development status of your modification at a glance.

Thank you,
The phpBB Modifications Team
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
robra
Registered User
Posts: 147
Joined: Thu Dec 09, 2010 2:09 am
Location: Brazil

Re: [ABD] - About Delete Inactive User Timer MOD

Post by robra » Tue Jul 26, 2011 7:21 pm

Sorry.
Is done.

Thanks.

User avatar
Paul
Extension Customisations
Extension Customisations
Posts: 23383
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [ABD] - About Delete Inactive User Timer MOD

Post by Paul » Tue Jul 26, 2011 7:53 pm

Locked as topic has been marked as ABD by the author.

If you want to have it reopened, please ask someone on the MOD team.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Locked

Return to “[3.0.x] Abandoned MODs”

Who is online

Users browsing this forum: No registered users and 15 guests

cron