2011-10-26, 03:50 PM
Im trying to do this in my templates while using the PHP plugin.
This Code Doesnt Work With The Variable
This Code Works Without The Variable
In the end im trying to get something that hides if a gid is found in a users additional groups, which is why im not using the simple "<if $GLOBALS['mybb']->user['usergroup'] == 1 then>".
If you dont know why this wont work, its because 9/10 times the additional groups will not contain a single number and will contain 5,7,3,6 for example.
Any ideas?
Thanks
This Code Doesnt Work With The Variable
<if (strpos($GLOBALS['mybb']->user['additionalgroups'], "4") == true) then></if>
This Code Works Without The Variable
<if (strpos("5,7,1,4", "4") == true) then></if>
In the end im trying to get something that hides if a gid is found in a users additional groups, which is why im not using the simple "<if $GLOBALS['mybb']->user['usergroup'] == 1 then>".
If you dont know why this wont work, its because 9/10 times the additional groups will not contain a single number and will contain 5,7,3,6 for example.
Any ideas?
Thanks