diff --git a/inc/mod/pages.php b/inc/mod/pages.php index b167cb69..d3900130 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -432,7 +432,8 @@ function mod_user_log($username, $page_no = 1) { if (empty($logs) && $page_no > 1) error($config['error']['404']); - $query = prepare("SELECT COUNT(*) FROM `modlogs`"); + $query = prepare("SELECT COUNT(*) FROM `modlogs` LEFT JOIN `mods` ON `mod` = `mods`.`id` WHERE `username` = :username"); + $query->bindValue(':username', $username); $query->execute() or error(db_error($query)); $count = $query->fetchColumn(0);