If a master account is in a usergroup you want to hide, in accountlist.php find (~lines 216-218)
and add below:
Replace X with the group-id of your Inactive group.
If it's in the Inactive group, the master account and all it's attached accounts are not displayed now in the accountlist.
For the attached accounts find (~lines 267-268)
and add below:
Replace X with the group-id of your Inactive group again.
Now if an attached account is in the Inactive group, it's hidden in the accountlist.
$master = get_user($master_acc);
if (!empty($master['uid']))
{
and add below:
if (is_member(X, $master['uid'])) continue;
Replace X with the group-id of your Inactive group.
If it's in the Inactive group, the master account and all it's attached accounts are not displayed now in the accountlist.
For the attached accounts find (~lines 267-268)
if ($account['as_uid'] == $master_acc)
{
and add below:
if (is_member(X, $account['uid'])) continue;
Replace X with the group-id of your Inactive group again.
Now if an attached account is in the Inactive group, it's hidden in the accountlist.