2015-01-26, 04:18 PM
Hello,
I'm currently including menu files which shows the menu according to whether the user has logged in or not.
For some reason, although the menu for guests which contains the login form works fine, redirects fine and shows the logged in content, the menu remains the same and therefore shows the login form again but they should be able to see the menu for logged in users.
What is wrong with this code?
Never mind, I forgot to add
All working now!
I'm currently including menu files which shows the menu according to whether the user has logged in or not.
<?php
if($mybb->user['uid'])
{
//user is logged in
include("member.php");
}
else
{
//user is not logged in
include("visitor.php");
}
?>
For some reason, although the menu for guests which contains the login form works fine, redirects fine and shows the logged in content, the menu remains the same and therefore shows the login form again but they should be able to see the menu for logged in users.
What is wrong with this code?
Never mind, I forgot to add
define("IN_MYBB", 1);
require_once("./en/global.php");
All working now!