2016-09-13, 12:57 PM
Not sure if anyone has pointed this out already, but there's an issue with usergroups. File inc/plugins/mysubs.php, line 580:
This does not work as the $sub variable hasn't been initialized. Instead, you should use $item which is loaded with the actual subscription.
Without this correction, if one of the subscriptions has a blank field as allowed usergroups the whole process will fail.
if($sub['accepted_gids'] != 'all')
{
$gids = explode(',', $user['additionalgroups']);
$gids[] = $user['usergroup'];
$matched = array_intersect($gids, explode(',', $sub['accepted_gids']));
if(empty($matched)) $accepted_gid = false;
}
This does not work as the $sub variable hasn't been initialized. Instead, you should use $item which is loaded with the actual subscription.
if($item['accepted_gids'] != 'all')
{
$gids = explode(',', $user['additionalgroups']);
$gids[] = $user['usergroup'];
$matched = array_intersect($gids, explode(',', $item['accepted_gids']));
if(empty($matched)) $accepted_gid = false;
}
Without this correction, if one of the subscriptions has a blank field as allowed usergroups the whole process will fail.