MyBB Community Forums

Full Version: Custom Page Help - Permissions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm trying to create a custom page, 'Staff Application' form. I have it working perfectly, except I want to display a new tab if a user has less than 75 posts AND the user isn't an admin.

I'm trying this code, but it still displays the tab for admins.

if($mybb->user['usergroup'] !== 4 || $mybb->user['postnum'] < 75)
{
	echo "<div class='tabber'>";
	echo "<div class='tabbertab'>";
	echo "<h2>You can't apply just yet...</h2>";
	echo "<div class='sorry_no_apply'>";
	echo "Sorry, but you need at least 75 (non-spam) posts on --- to apply for a staff position.
	<br/>Please make at least 75 posts, and then come back and apply.";
	echo "</div>";
	echo "</div>";
	echo "</div>";
}

I've also tried replacing || with && and it still doesn't work.

Thanks Smile
if($mybb->user['usergroup'] != 4 && $mybb->user['postnum'] < 75)

That should be fine.
Thanks so much, that works perfect! Smile