Cupara
Well-known member
I have a custom field in the forum table that allows admins to allow usergroups to bypass a restriction in place. Once they choose all the usergroups, it saves to the table in a comma list. What I'm trying to do now is setup the if condition to check the users usergroup and secondary group ids against these saved ids before allowing them to bypass the restriction.
I have this:
It doesn't seem to work as the restriction bypass does not allow me to pass so I'm assuming the method I am using of '==' is not going to work but I'm not sure what else to use that will work in this case. I'm extending the forum and node classes so rewriting code that already exists honestly is not a road I want to take.
I have this:
HTML:
<xf:if is="{$xf.visitor.user_group_id} == {$node.Forum.gt_ag_grouplist} OR {$xf.visitor.secondary_group_ids} == {$node.Forum.gt_ag_grouplist}">
It doesn't seem to work as the restriction bypass does not allow me to pass so I'm assuming the method I am using of '==' is not going to work but I'm not sure what else to use that will work in this case. I'm extending the forum and node classes so rewriting code that already exists honestly is not a road I want to take.