Gossamer
Active member
Hello! I have a conditional in my message_user_info template to show a different graphic based on what usergroup the user is in. Unfortunately, it's not quite working out the way it should.
On my forum, every user is part of the basic registered group as their primary usergroup. I then assign any other appropriate groups as secondary usergroups (just one secondary group per user).
The above mostly works until I get down to the last two conditionals.
I have a user with no secondary usergroups. However, they are given the usergroup icon for usergroup 6 (ooc_icon.png). I've double-checked their usergroups to make sure they don't have that usergroup assigned as either primary or secondary. This is true of every account without a secondary usergroup assigned, though the problem seems to come and go when I rebuild the user cache.
Is there just something I'm missing in my conditional or a better way to do this?
Code:
<xen:if is="{xen:helper ismemberof, $user, 7}">
<img src="styles/jagger/groupimages/user_CascadeBay.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 8}" />
<img src="styles/jagger/groupimages/user_PandoraTown.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 13}" />
<img src="styles/jagger/groupimages/user_Horizon.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 12}" />
<img src="styles/jagger/groupimages/user_Morhall.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 11}" />
<img src="styles/jagger/groupimages/user_MistyHollow.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 15}" />
<img src="styles/jagger/groupimages/user_Vagabond.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 5}" />
<img src="styles/jagger/groupimages/newcomer_icon.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 4}" />
<img src="styles/jagger/groupimages/mod_icon.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 3}" />
<img src="styles/jagger/groupimages/admin_icon.png" />
<xen:elseif is="{xen:helper ismemberof, $user, 6}" />
<img src="styles/jagger/groupimages/ooc_icon.png" />
<xen:else />
<img src="styles/jagger/groupimages/visitor_icon.png" />
</xen:if>
On my forum, every user is part of the basic registered group as their primary usergroup. I then assign any other appropriate groups as secondary usergroups (just one secondary group per user).
The above mostly works until I get down to the last two conditionals.
I have a user with no secondary usergroups. However, they are given the usergroup icon for usergroup 6 (ooc_icon.png). I've double-checked their usergroups to make sure they don't have that usergroup assigned as either primary or secondary. This is true of every account without a secondary usergroup assigned, though the problem seems to come and go when I rebuild the user cache.
Is there just something I'm missing in my conditional or a better way to do this?