MyBB Community Forums

Full Version: where can I call get_unviewable_forums()?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At first time, I hook my function at index_start (in this function I call get_unviewable_forums()), it works fine (get_unviewable_forums() return a list of unviewable forums' id), but if I call it at index_end, it return null instead of list of unviewable forums' id.
The get_unviewable_forums() function fails at the end of index.php because of this line:
$permissioncache['-1'] = "1";

You could call it at the beginning of index.php, which will force the permission cache to be built, then call the function at the end of index.php to your liking.