Thanks. It seems working on cleaning cache... At least, when I
change the order of groups I call the function for, I always get
the same results...
But they are unexpected, mostly for usergroups 5 and 6 !!!
I wrote this function (used a function to avoid some side effect
coming from global variables not explicitly declared):
PHP Code:
function testugperm($forum2test=9) {
global $DB_site;
$usergroups=$DB_site->query("SELECT usergroupid,title FROM usergroup ORDER BY usergroupid");
echo "<p><pre>";
while ($usergroup=$DB_site->fetch_array($usergroups)) {
unset($permscache, $usergroupcache);
$perms=getpermissions($forum2test,0,$usergroup[usergroupid]);
if ($perms[canview])
echo "<br>Forum <b>$forum2test</b> <b> can </b> be accessed by usergroup $usergroup[usergroupid] ($usergroup[title])";
else
echo "<br>Forum <b>$forum2test</b> <b>can't</b> be accessed by usergroup $usergroup[usergroupid] ($usergroup[title])";
}
echo "</pre></p>";
}
but - even on public forums or private without specific access
masks - I see Admin & Supermods can't access them.
Besides, I think there should be some cache interference yet, as -
for example - if I test permissions by users with
PHP Code:
unset($permscache, $usergroupcache);
$perms=getpermissions($forum2test,$userid);
for first 20 users, when the cycle passes from a group to another,
I see the new group couldn't access that forum ...
Instead, it can !
Even, i tried to unset the corresponding GLOBALS[] array
variables, as I'm within a function...
But results are the same.
Any idea ?
Thank you very much.