MyBB Community Forums

Full Version: Select forums that the current user can access
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would I make my SQL query only take the forums that the currently authenticated user can see?

SELECT * FROM mybb_forums

Thanks in advanceĀ  Cool
Hello,

Can you explain more about what you want to do? If you've set permissions per group in the ACP to access specific forums why do you need to run an SQL Query?
What I am trying to do is actually to remake the "latest threads" section of the site to only show latest threads from forum sections that they have access to. By default, I can only make some specific forums be excluded.
MyBB operations work on the basis that when a member clicks new posts/today's posts they only see threads from sections they have permissions to view. In other words, if you have a 'Staff' forum, normal users will not see the threads when searching if they cannot view the forum directly. The built-in permissions should support what you are trying to do without the need of plugins or queries.
But the theme I have bought does have a custom section showing "latest threads" that does not support this.
And the creator of the theme does not really do any support.
There is a plugin that it probably uses - https://community.mybb.com/mods.php?action=view&pid=191
It seems like another one, since my one has a "latests_threads.php" file in the root.
However I will look into that one, maybe it can help.
Thanks.