TProfileHelper.php 456 B

12345678910111213141516171819202122
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Profile;
  8. use OCP\IConfig;
  9. trait TProfileHelper {
  10. protected function isProfileEnabledByDefault(IConfig $config): ?bool {
  11. return filter_var(
  12. $config->getAppValue('settings', 'profile_enabled_by_default', '1'),
  13. FILTER_VALIDATE_BOOLEAN,
  14. FILTER_NULL_ON_FAILURE,
  15. );
  16. }
  17. }