MyBB Community Forums

Full Version: page restriction problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello,
i have restricted one page by putting the following code
define('IN_MYBB', 1);
require_once ("../global.php");
if ( $mybb->user['usergroup'] == 1)
{
    error_no_permission();

} 

it is running successfully that when guest opens tha page it shows the login page but after login it shows could not find member.php
i have put this page outside mybb folder in to my website folder , how sjhould i redirect it to member page from there so that it opens this page for registered users
(2016-02-08, 12:30 PM)ishank Wrote: [ -> ]hello,
i have restricted one page by putting the following code
define('IN_MYBB', 1);
require_once ("../global.php");
if ( $mybb->user['usergroup'] == 1)
{
    error_no_permission();

} 

it is running successfully that when guest opens tha page it shows the login page but after login it shows could not find member.php
i have put this page outside mybb folder in to my website folder , how sjhould i redirect it to member page from there so that it opens this page for registered users

It sounds like a problem with your login page as opposed to an issue with that file. Just for future reference you can do this to check if the user is a guest 
if (!$mybb->user['uid']) {
	error_no_permission();
}