From 3e38ce226818250cfdb6be44af0ad10ed57ae05f Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 3 Sep 2019 15:50:14 -0600 Subject: [PATCH] Calendar - add missing group memberships on initial load when user is not in group --- calendar/inc/class.calendar_owner_etemplate_widget.inc.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 29691047d1..65f51197a0 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -116,15 +116,12 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist { $resource = array('app'=> 'api-accounts'); } - else if ($owner < 0) + if ($resource && is_numeric ($owner) && (int)$owner < 0) { // Add in group memberships as strings $info['resources'] = array_map(function($a) { return ''.$a;},$GLOBALS['egw']->accounts->members($owner, true)); } - else - { - continue; - } + $option = array('value' => $owner, 'label' => $label, 'app' => lang($resource['app'])) + $info; $sel_option_index = $this->get_index($sel_options, 'value', $owner); if($sel_option_index === false)