registerCapability(Capabilities::class); // Register Event Listeners $context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class); $context->registerEventListener(UserLiveStatusEvent::class, UserLiveStatusListener::class); $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); $context->registerEventListener(OutOfOfficeChangedEvent::class, OutOfOfficeStatusListener::class); $context->registerEventListener(OutOfOfficeScheduledEvent::class, OutOfOfficeStatusListener::class); $context->registerEventListener(OutOfOfficeClearedEvent::class, OutOfOfficeStatusListener::class); $config = $this->getContainer()->query(IConfig::class); $shareeEnumeration = $config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; $shareeEnumerationInGroupOnly = $shareeEnumeration && $config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; $shareeEnumerationPhone = $shareeEnumeration && $config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no') === 'yes'; // Register the Dashboard panel if user enumeration is enabled and not limited if ($shareeEnumeration && !$shareeEnumerationInGroupOnly && !$shareeEnumerationPhone) { $context->registerDashboardWidget(UserStatusWidget::class); } } public function boot(IBootContext $context): void { /** @var IManager $userStatusManager */ $userStatusManager = $context->getServerContainer()->get(IManager::class); $userStatusManager->registerProvider(UserStatusProvider::class); } }