Fix sql error when user has no profile

This commit is contained in:
Calvo 2022-03-11 15:42:06 +01:00
parent 601cd1cba4
commit 6ac7488ca4
1 changed files with 7 additions and 2 deletions

View File

@ -1267,11 +1267,16 @@ $session_time .= html_print_input_text(
$user_groups = implode(',', array_keys((users_get_groups($id, 'AR', $display_all_group))));
$event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')');
if ($event_filter_data === false) {
if (empty($user_groups) === false) {
$event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')');
if ($event_filter_data === false) {
$event_filter_data = [];
}
} else {
$event_filter_data = [];
}
$event_filter = [];
$event_filter[0] = __('None');
foreach ($event_filter_data as $filter) {