so thats also 0 when your logged in hmm ok.. that sheds some light on it..
only way for that to set to 0 is if $Grouppostsquery is empty that all relies on these lines..
[]
if (!$user['U_Groups']) { $user['U_Groups'] = "-4-"; }
$calGrouparray = split("-",$user['U_Groups']);
$calgsize = sizeof($calGrouparray);
$Usergroupquery = "(";
$Grouppostsquery = "(";
$calg = 0;
$calgroupcheck = 0;
for ($i=0; $i<$calgsize;$i++)
{
if (!preg_match("/[0-9]/",$calGrouparray[$i])) { continue; };
if ($adminmodshow == '0')
{
if ($calGrouparray[$i] == '1')
{
$calgroupcheck = 1;
}
if ($calGrouparray[$i] == '2')
{
$calgroupcheck = 2;
}
}
$calg++;
if ($calg > 1)
{
$Usergroupquery .= " OR ";
$Grouppostsquery .= " OR ";
}
$Usergroupquery .= "`U_Groups` LIKE '%-$calGrouparray[$i]-%'";
$Grouppostsquery .= "`Bo_Read_Perm` LIKE '%-$calGrouparray[$i]-%'";
}
[/]
so I am wondering if in fact this line $user['U_Groups'] is working for you. I have seen where some servers can get away with that line and some have to actually set it to a number like $user[2] depending on what element in the $user array has placed the groups function.
if your willing to try one more thing take any custompal box or heck even this script and somewhere towards the top place this
echo $user['U_Groups'];
and see if it returns anything.