Kyojii
12-23-2010, 07:11 PM
Here's an easier example of my problem.
<?php
require_once("./global.php");
echo is_member_of($vbulletin->userinfo, 6);
?>
Result: 1 (true)
<?php
require_once('./global.php');
function allowaccess() {
if (is_member_of($vbulletin->userinfo, 6)){
return 1;
}
else{
return 0;
}
}
echo allowaccess();
?>
Result: 0 (false)
--------------- Added 1293142374 at 1293142374 ---------------
I got around this by instead of making my own function just making an array of users I wanted to be able to access the page and including the file on every page.
<?php
require_once("./global.php");
echo is_member_of($vbulletin->userinfo, 6);
?>
Result: 1 (true)
<?php
require_once('./global.php');
function allowaccess() {
if (is_member_of($vbulletin->userinfo, 6)){
return 1;
}
else{
return 0;
}
}
echo allowaccess();
?>
Result: 0 (false)
--------------- Added 1293142374 at 1293142374 ---------------
I got around this by instead of making my own function just making an array of users I wanted to be able to access the page and including the file on every page.