MyBB Community Forums

Full Version: How to deny access to guests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, I would like to know how do you deny access to certain pages you make, like using page manager or something and giving them a log in/sign in page.

Also I would like to know how do you deny access/put a 403 forbidden page on certain urls they visit. I want it so they can click on the link if they are signed in and on my site, and they don't get the 403 error, but if they are not signed in, or they type it in there browser, I want them to get a 403 forbidden error. How would I do that?

Thanks...
To just block guests you can go into groups and edit the guest group you can find all the options for guests.
That's not what I mean...
Add this code to any custom page you are making
if($mybb->user['uid'] == 0 || $mybb->usergroup['canusercp'] == 0)
{
	error_no_permission();
}
How to you put a 403 forbidden error for everyone on a certain url? .htacess?
How to you put a 403 forbidden error to guests, and banned members for a certain url, and for members, and staff it works. Like how do I put a 403 forbidden error for like a chatbox url? Do I change to permission in the files?
Take a look at the link below for banned members.

http://community.mybb.com/thread-100501.html
What about for guests?
It's complete same for banned usergroup, just change the UID of group to guests group.
What do you want to deny access to? A certain forum, page (Provide URL), etc.

(2013-10-02, 12:30 AM)Jovan J. Wrote: [ -> ]It's complete same for banned usergroup, just change the UID of group to guests group.

Ninja'd but they don't want to use PHP. They requested something for .htaccess
Pages: 1 2