mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Calendar - add missing group memberships on initial load when user is not in group
This commit is contained in:
parent
923cc0b01b
commit
3e38ce2268
@ -116,15 +116,12 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
{
|
{
|
||||||
$resource = array('app'=> 'api-accounts');
|
$resource = array('app'=> 'api-accounts');
|
||||||
}
|
}
|
||||||
else if ($owner < 0)
|
if ($resource && is_numeric ($owner) && (int)$owner < 0)
|
||||||
{
|
{
|
||||||
// Add in group memberships as strings
|
// Add in group memberships as strings
|
||||||
$info['resources'] = array_map(function($a) { return ''.$a;},$GLOBALS['egw']->accounts->members($owner, true));
|
$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;
|
$option = array('value' => $owner, 'label' => $label, 'app' => lang($resource['app'])) + $info;
|
||||||
$sel_option_index = $this->get_index($sel_options, 'value', $owner);
|
$sel_option_index = $this->get_index($sel_options, 'value', $owner);
|
||||||
if($sel_option_index === false)
|
if($sel_option_index === false)
|
||||||
|
Loading…
Reference in New Issue
Block a user