Need another help, how to perform a check if user logged in inside globals.php?
I tried this and didnt work..
globals.php
if ($mybb->user['uid']) { $message = "You are logged in"; }
else { $message = ""; }
Try this:
if(!$mybb->user['uid'])
{
$message = "You're logged out!";
}
else
{
$message = "You're logged in!";
}
Remember, if it's in function, make sure $mybb is globalised.
(2013-03-22, 11:28 AM)Seabody Wrote: [ -> ]Try this:
if(!$mybb->user['uid'])
{
$message = "You're logged out!";
}
else
{
$message = "You're logged in!";
}
Remember, if it's in function, make sure $mybb is globalised.
Still cant, even though mybb confirms im logged in, and displays UID as 2, but for your code, it says im logged out x_x
You should develop a plugin instead of making core edits and eval()uate the code.
(2013-03-22, 11:56 AM)Nathan Malcolm Wrote: [ -> ]You should develop a plugin instead of making core edits and eval()uate the code.
Lol I wish i could, but I dont have basics to make one. I'll try figure things out. A little more hardwork might give a better result right?
Thanks for helping one again @Seabody. I was able to solve this issue ;D. The codes are correct but again, placed on wrong section haha xD. Below is what I did
global.php (line 61, after session declare)
// Create session for this user
...
if ($mybb->user['uid']) { $message = "You are logged in"; }
else { $message = ""; }
Thank you again