MyBB Community Forums

Full Version: check if user can view a forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all, i'm using this code to check if a user can view a forum

$uid is the users's id

49 is forum id

$fpermissions = forum_permissions(49, $uid);

$canview = $fpermissions['canview']; 

       
it is working right except when the gruop of the user ha no access to the forum but some admin gave the right to view the forum with custom user permission plugin, in this case $canview is 0 even if the user can view the forum.

how can i get the right permissions ?

thanks.
You may want to ask the author of the user permission plugin.
i investigated into the plugin's code it update these global variables

$cached_forum_permissions
$cached_forum_permissions_permissions

so i've to check into the variables form the user permission, but i found no documentation about these variables.