MyBB Community Forums

Full Version: Incorrect Navbar Showing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

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!