$bbsuserinfo is a global template variable. I am not sure if it is populated with valid data to every template, but it is accessible. Function "is_member_of" is an already declared "safe function". So if you use Nerbert's example of how to use the function is_member_of correctly it should work.
I search my own templates and found I used it in showthread...
Code:
<vb:if condition="is_member_of($bbuserinfo, array(2,18))">
{vb:debugvardump $bbuserinfo} <!-- Do not put this line in your code... It will not work. I left it here so you could see where I the output was generated from -->
</vb:if>
In this case if the user was a member of primary usergroup '2' and secondary usergroup '18' the code would execute.
OUTPUT:
Code:
var_dump: $bbuserinfoarray(213) { ["userid"]=> string(2) "10" ["temp"]=> NULL ["field1"]=> string(0) "" ["field2"]=> string(0) "" ["field3"]=> string(0) "" ...