aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/convertors/functions_phpbb20.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-02-25 11:59:22 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-02-25 11:59:22 +0000
commit8e5563218152808ed284a822b59b98df2ea937c0 (patch)
treefb9c0f9869a9f18775384ed719aeac042f6775ae /phpBB/install/convertors/functions_phpbb20.php
parentbcecae8993d3196957a6984953a1b156b51e1649 (diff)
downloadforums-8e5563218152808ed284a822b59b98df2ea937c0.tar
forums-8e5563218152808ed284a822b59b98df2ea937c0.tar.gz
forums-8e5563218152808ed284a822b59b98df2ea937c0.tar.bz2
forums-8e5563218152808ed284a822b59b98df2ea937c0.tar.xz
forums-8e5563218152808ed284a822b59b98df2ea937c0.zip
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
Diffstat (limited to 'phpBB/install/convertors/functions_phpbb20.php')
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php12
1 files 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;
}