Ozzy47
Well-known member
Okay what am I doing wrong here?
In my listener file I have this.
Now if I remove
In my listener file I have this.
PHP:
<?php
namespace OzzModz\Myaddon;
class Listener
{
public static function appSetup(\XF\App $app)
{
// get options
$options = \XF::options();
// Get variables
$this= $options->optionone;
$that = $options->optiontwo;
$groups = $options->select_groups;
$visitor = \XF::visitor();
// If this
if ($this && $visitor->isMemberOf($groups))
{
dothis;
}
// If that
if ($that && $visitor->isMemberOf($groups))
{
dothat;
}
if ($this || $that)
{
dothem;
}
}
}
Now if I remove
&& $visitor->isMemberOf($groups)
everything works as intended. But once that is added, it only works if I select every usergroup frpm my ACP option. My ACP option is a XF\Option\UserGroup::renderSelectMultiple
which is an array.