From 8e5563218152808ed284a822b59b98df2ea937c0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 25 Feb 2007 11:59:22 +0000 Subject: [PATCH] ok, this should still fix the issues for empty poster ids within the posts table (they are skipped) but should fix wrong ban entries (after conversion the anonymous user is banned. :)) git-svn-id: file:///svn/phpbb/trunk@7060 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/convertors/functions_phpbb20.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 1895fb25fe..2f1c3025b8 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -487,18 +487,16 @@ function phpbb_user_id($user_id) return ANONYMOUS; } - // This should never ever happen - 2.0.x is not allowing a user id of 0 - // But we return the anonymous user to be consistent and not breaking functionality - if (!$user_id) - { - return ANONYMOUS; - } - if (!empty($config['increment_user_id']) && $user_id == 1) { return $config['increment_user_id']; } + // A user id of 0 can happen, for example within the ban table if no user is banned... + // Within the posts and topics table this can be "dangerous" but is the fault of the user + // having mods installed (a poster id of 0 is not possible in 2.0.x). + // Therefore, we return the user id "as is". + return $user_id; }