Bug #533
Admincp User Merge and Disabled Forum Postcount
| Status: | Closed | Start date: | 11/16/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Ryan Gordon | % Done: | 100% |
|
| Category: | Admin Control Panel | |||
| Target version: | 1.4.10 | |||
| Reproducibility: | Always | Database Type: | ||
| Reported In MyBB Version: | 1.4.8 | Database Version: | ||
| PHP Version: | SQA assignments: | |||
| Browser: |
Description
In the admin/modules/users/users.php the function for the account merge does not take into account forums with post count disabled.
// Update user post count
$query = $db->simple_select("posts", "COUNT(*) AS postnum", "uid='".$destination_user['uid']."'");
$num = $db->fetch_array($query);
$updated_count = array(
"postnum" => $num['postnum']
);
$db->update_query("users", $updated_count, "uid='{$destination_user['uid']}'");
Associated revisions
Fixes Admincp User Merge and Disabled Forum Postcount (fixes:533)
Fixes Admincp User Merge and Disabled Forum Postcount (fixes:533)
History
Updated by Ryan Gordon about 2 years ago
- Status changed from New to Assigned
- Assignee set to Ryan Gordon
- Target version set to 1.4.10
Updated by Ryan Gordon about 2 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset r4529.
Updated by Michael Schlechtinger about 2 years ago
This fix leads to a sql error if there are no forums where the postcount is disabled.
SQL Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 Query: SELECT COUNT(*) AS postnum FROM mybb_posts WHERE uid='2' AND fid NOT IN(0,)
Possible fix:
Open admin/modules/user/users.php and search for:
$fids = ",".implode(",", $fids);
Replace with:
if($fids)
{
$fids = ",".implode(",", $fids);
}
else
{
$fids = "";
}
Updated by Michael Schlechtinger about 2 years ago
- Status changed from Resolved to Feedback
Updated by Ryan Gordon about 2 years ago
- Status changed from Feedback to Resolved
Applied in changeset r4555.
Updated by Michael Schlechtinger about 2 years ago
- Status changed from Resolved to Closed