aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-03-25 20:57:35 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-04-19 20:35:13 -0400
commit953e829b527acd6de80fee93bb1bfd08c6010c51 (patch)
tree5b3392a5015bcd69f19b8231b42c9db7ad220ee6 /phpBB/includes/functions_user.php
parent15d2f294c664e11fb1f2bc84238067cf71a544e6 (diff)
downloadforums-953e829b527acd6de80fee93bb1bfd08c6010c51.tar
forums-953e829b527acd6de80fee93bb1bfd08c6010c51.tar.gz
forums-953e829b527acd6de80fee93bb1bfd08c6010c51.tar.bz2
forums-953e829b527acd6de80fee93bb1bfd08c6010c51.tar.xz
forums-953e829b527acd6de80fee93bb1bfd08c6010c51.zip
[feature/prune-users] Non-cosmetic changes per bantu's review.
PHPBB3-9622
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c78949342b..09a6394323 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -353,7 +353,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $user_rows[$row['user_id']] = $row;
+ $user_rows[(int) $row['user_id']] = $row;
}
$db->sql_freeresult($result);
@@ -451,11 +451,10 @@ function user_delete($mode, $user_ids, $retain_username = true)
$post_username = $user_row['username'];
}
- // If the user is inactive and newly registered we assume no posts from the user, and save the queries
- if ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_REGISTER && !$user_row['user_posts'])
- {
- }
- else
+ // If the user is inactive and newly registered
+ // we assume no posts from the user, and save
+ // the queries
+ if ($user_row['user_type'] != USER_INACTIVE || $user_row['user_inactive_reason'] != INACTIVE_REGISTER || $user_row['user_posts'])
{
// When we delete these users and retain the posts, we must assign all the data to the guest user
$sql = 'UPDATE ' . FORUMS_TABLE . '