aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_prune.php
diff options
context:
space:
mode:
authorRuslan Uzdenov <rxu@mail.ru>2009-07-14 12:02:11 +0000
committerRuslan Uzdenov <rxu@mail.ru>2009-07-14 12:02:11 +0000
commit5cbf5d4b16a41ea2599cb7f56836d5b963ab4000 (patch)
treed424b198fabe79e44d73608cc5b814fc21d549c7 /phpBB/includes/acp/acp_prune.php
parentecfe24528c46b264baa164ba5811fcc5cfab231e (diff)
downloadforums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar
forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar.gz
forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar.bz2
forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar.xz
forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.zip
Fix bug #44295 - Cannot prune users who never logged in
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9754 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_prune.php')
-rw-r--r--phpBB/includes/acp/acp_prune.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index a82a438db7..7eeb37133f 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -406,7 +406,12 @@ class acp_prune
$where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : '';
$where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
- if (sizeof($active) && $active_select != 'lt')
+ // First handle pruning of users who never logged in, last active date is 0000-00-00
+ if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
+ {
+ $where_sql .= ' AND user_lastvisit = 0';
+ }
+ else if (sizeof($active) && $active_select != 'lt')
{
$where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
}