MyBB Community Forums

Full Version: additional page in html
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to create an additional page in html. Is there a way I can restrict access to this page to just certain groups?
I have installed Page Manager and created the page and it works the way I wanted. Still looking to see if anyone knows of a way to restrict access to just certain user groups.
Add this code at the very top:

<?php

$disallowed = array('1', '2', '3', '4', '5');

if(in_array($mybb->user['usergroup'], $disallowed))
{
	error_no_permission();
}

?>

Replace the numbers in $disallowed with the gids of the groups you do not want to be able to view the page.
You are awesome.....it worked like a charm. Thank you very much