MyBB Community Forums

Full Version: Add Conditions in Templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2012-04-29, 03:40 PM)JovanJ. Wrote: [ -> ]
<if $mybb->user['usergroup'] != 3 && $mybb->user['usergroup'] != 5 && $mybb->user['usergroup'] != 7 then>
// show to that usergroup.
</if>

or:

<if !in_array($mybb->user['usergroup'], array(3,5,7)) then>
// show to that usergroup.
</if>

Neither seemed to work as it's displaying the link for guests even though I haven't included the ID of 1.

Never mind, != just needed to be ==
Oh, sorry, good if works Smile
I wouldn't say "of course it's secure". Nothing is 100% secure.
Pages: 1 2