Staxed
Active member
Hello,
I found a resource a few days ago that I liked, but I edited to work with groups rather than user IDs (well...i thought I did). I just thought about it today and realized I did the wrong thing.
I am trying to get a message to show on a members profile if they are a member of certain groups. But what I managed to do was have it show TO members of those groups, rather than putting it on their profile pages.
I can't seem to find the variable to use for the group.
This is the wrong code I used that gives me the effect I don't want:
This is the original code that works the way I want, but I want to change the user IDs to Group IDs (including secondary groups hopefully).
What do I need to replace $user.user_id with to make it use a group ID instead...I've searched, and I can't seem to find it (is it listed somewhere and I'm looking in the wrong spot?)
EDIT:
I figured out that $user.user_group_id works for the primary group, but I'm now trying to figure out the secondary group stuff. I used a dump of $user and it showed a parameter of secondary_group_ids but it doesn't seem to work when I use it.
I found a resource a few days ago that I liked, but I edited to work with groups rather than user IDs (well...i thought I did). I just thought about it today and realized I did the wrong thing.
I am trying to get a message to show on a members profile if they are a member of certain groups. But what I managed to do was have it show TO members of those groups, rather than putting it on their profile pages.
I can't seem to find the variable to use for the group.
This is the wrong code I used that gives me the effect I don't want:
Code:
<xen:if is="{xen:helper ismemberof, $visitor, x, y}">
This is the original code that works the way I want, but I want to change the user IDs to Group IDs (including secondary groups hopefully).
Code:
<xen:if is="{$user.user_id} == 1 OR {$user.user_id} == 2 OR {$user.user_id} == 5">
What do I need to replace $user.user_id with to make it use a group ID instead...I've searched, and I can't seem to find it (is it listed somewhere and I'm looking in the wrong spot?)
EDIT:
I figured out that $user.user_group_id works for the primary group, but I'm now trying to figure out the secondary group stuff. I used a dump of $user and it showed a parameter of secondary_group_ids but it doesn't seem to work when I use it.