2019-09-22, 06:52 PM
I'm trying to get information about the logged in mybb user into my main website. I've searched and it seems like this should work but it doesn't. This code is in a file in my root directory with triptalk being the mybb directory.
The result is
User:0
The same file put into the triptalk directory without the chdir lines shows
User:2
Any ideas would be most appreciated.
chdir("triptalk/");
define("IN_MYBB", 1);
require("./global.php");
chdir("../");
$c = $mybb->user['uid'];
echo "User:" . $c;
The result is
User:0
The same file put into the triptalk directory without the chdir lines shows
User:2
Any ideas would be most appreciated.