mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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
This commit is contained in:
parent
bcecae8993
commit
8e55632181
1 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue