22
You are searching it too far. With your code snippet, the page is visible if the user is not logged in or when he is logged in, if there exists no users except for 1 or 34 in the database ...
It is much simpler:
// see who is logged in
if(is_object($xoopsUser)) {
$uid = $xoopsUser->getVar('uid');
}
else
{
$uid = 0;
}
// is it 1 or 34?
$userisok =(($uid == 1) || ($uid == 34));
// if it is not ok send him home
if (!$userisok) {
redirect_header(XOOPS_URL, 5, 'No permission');
exit();
}