1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Duplicate Prevent Spamming in the Profile Posts Widget?

Discussion in 'Closed Suggestions' started by Jaxel, Dec 30, 2014.

  1. Jaxel

    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:
    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');
    This issue could be easily fixed by simply adding to the query:
    GROUP BY profile_post.profile_user_id
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. clove28

    clove28 Active Member

    Do I just need to add the second code to the end of the first code?

Share This Page