Fixed admin free join query nesting

This commit is contained in:
Igor Scheller 2021-10-04 01:57:43 +02:00 committed by msquare
parent 71d9077a03
commit c2c1a4d281
1 changed files with 7 additions and 3 deletions

View File

@ -57,9 +57,13 @@ function admin_free()
$join->on('UserAngelTypes.user_id', '=', 'users.id') $join->on('UserAngelTypes.user_id', '=', 'users.id')
->where('UserAngelTypes.angeltype_id', '=', $angelType); ->where('UserAngelTypes.angeltype_id', '=', $angelType);
}); });
$query->join('AngelTypes', 'UserAngelTypes.angeltype_id', 'AngelTypes.id')
$query->join('AngelTypes', function ($join) {
/** @var JoinClause $join */
$join->on('UserAngelTypes.angeltype_id', '=', 'AngelTypes.id')
->whereNotNull('UserAngelTypes.confirm_user_id') ->whereNotNull('UserAngelTypes.confirm_user_id')
->orWhere('AngelTypes.restricted', '=', '0'); ->orWhere('AngelTypes.restricted', '=', '0');
});
} }
$users = $query->get(); $users = $query->get();