"Own Angeltypes" filter: only select restricted type if already confirmed

This commit is contained in:
Igor Scheller 2021-07-14 00:40:31 +02:00 committed by msquare
parent ff8adafd33
commit 950a865c0c
1 changed files with 5 additions and 0 deletions

View File

@ -195,7 +195,12 @@ function view_user_shifts()
$rooms = load_rooms(); $rooms = load_rooms();
$types = load_types(); $types = load_types();
$ownTypes = []; $ownTypes = [];
foreach (UserAngelTypes_by_User($user->id, true) as $type) { foreach (UserAngelTypes_by_User($user->id, true) as $type) {
if (!$type['confirm_user_id'] && $type['restricted']) {
continue;
}
$ownTypes[] = (int)$type['angeltype_id']; $ownTypes[] = (int)$type['angeltype_id'];
} }