basic function to restrict guests is the following;
if ($mybb->user['uid'] == ' ')
{
error("You didnot have permission to access this page.");
}
and you have to put this in header.
Thanks ghazal .
I already also used this code and it worked
// No permission for guests
if(!$mybb->user['uid'])
{
error_no_permission();
}
w'salam alkym.
were exactly do i place this code ?
At the top of the page
Like so:
global $mybb;
if(!$mybb->user['uid'])
{
error_no_permission();
}
//rest of file...