Hi all,

we are using DrupalVB and also have the block "Recent Posts" active on the site. However, our forum contains non-public forums as well but the Recent Post block shows all new threads regardless from access rights.

I believe the SQL statement used for the Recent Post function is this:
SELECT t.threadid, t.title, t.replycount, t.dateline AS created, t.postuserid AS userid, t.postusername AS name FROM {thread} t INNER JOIN {forum} f ON f.forumid = t.forumid WHERE f.showprivate = 0 AND t.lastpost >= %d ORDER BY t.dateline DESC LIMIT %d

How would I gave to change that statement so that only those new threads are displayed that the public (unregistered) has access to?

Can anybody help?

Best regards,
George

Comments

tamitha’s picture

subscribe

binary basketball’s picture

When viewing the home page, it doesn't display my private forum threads but if you are anywhere else on the site it does

sun’s picture

Version: 5.x-2.2 » 6.x-2.x-dev
Component: Miscellaneous » Code
Category: support » task

#896096: Hide private forum threads from Last Post/Thread block has been marked as duplicate of this issue.