View Full Version : How to check if user belongs to certain additional usergroup in postbit profile?
RedTurtle
11-03-2012, 10:46 PM
I am trying to make an if conditional statement that would allow me to find users who have connected through Facebook Connect on my forum. Currently all users who use Facebook Connect are added to an additional usergroup called FB Connect.
I would like to show a tiny FB icon in their postbit legacy profile fields if they belong to this usergroup. How could I achieve this?
I'm on 4.2.0 PL3.
Something like this should work (in the postbit_legacy template):
<vb:if condition="is_member_of($post, X)">put code for icon here</vb:if>
where X is the id of your facebook additional usergroup.
RedTurtle
11-03-2012, 11:08 PM
Wow thank you for such a quick reply kh99!!
If I'd like to make this conditional only visible to certain usergroups (admin/mod) do I wrap another <vb:if> around it or is there a way to modify this one to include that check?
Thank you again for such a quick response!
If I'd like to make this conditional only visible to certain usergroups (admin/mod) do I wrap another <vb:if> around it or is there a way to modify this one to include that check?
You could do it either way. To do it with one 'if' it would be something like:
<vb:if condition="is_member_of($bbuserinfo, 5, 6, 7) AND is_member_of($post, X)">put code for icon here</vb:if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.