Jaxel
Well-known member
With the default XenForo profile posts widget, if someone posts 5 status updates a row, they will spam the entire widget. This widget should be restricted to only one profile post per user at a time. Currently the query is as follows:
This issue could be easily fixed by simply adding to the query:
Code:
return $this->fetchAllKeyed($this->limitQueryResults(
'
SELECT profile_post.*
' . $sqlClauses['selectFields'] . '
FROM xf_profile_post AS profile_post
' . $sqlClauses['joinTables'] . '
WHERE ' . $whereClause . '
ORDER BY profile_post.post_date DESC
', $limitOptions['limit'], $limitOptions['offset']
), 'profile_post_id');
Code:
GROUP BY profile_post.profile_user_id
Upvote
0