diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-03-17 18:06:38 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-03-18 02:55:12 +0000 |
commit | 108abd77ed0ee29bca4019f6a212ba1b2bdad5e7 (patch) | |
tree | 3c2d3f2382b83eb93cae4f974d20bbbbe2b9789b /lib/private/Profile | |
parent | 1fc0b4320c8921ad59bf4d41a88bf9936e1f653d (diff) | |
download | nextcloud-server-108abd77ed0ee29bca4019f6a212ba1b2bdad5e7.tar.gz nextcloud-server-108abd77ed0ee29bca4019f6a212ba1b2bdad5e7.zip |
Add profile default setting for admin
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/private/Profile')
-rw-r--r-- | lib/private/Profile/TProfileHelper.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/private/Profile/TProfileHelper.php b/lib/private/Profile/TProfileHelper.php index 0d4b5c6286e..5b57e1c9d5c 100644 --- a/lib/private/Profile/TProfileHelper.php +++ b/lib/private/Profile/TProfileHelper.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * @copyright 2022 Christopher Ng <chrng8@gmail.com> * * @author Christopher Ng <chrng8@gmail.com> * @@ -26,19 +26,12 @@ declare(strict_types=1); namespace OC\Profile; -use OCP\Accounts\IAccount; -use OCP\Accounts\IAccountManager; +use OCP\IConfig; trait TProfileHelper { - - /** - * Returns whether the profile is enabled for the account - * - * @since 23.0.0 - */ - protected function isProfileEnabled(IAccount $account): ?bool { + protected function isProfileEnabledByDefault(IConfig $config): ?bool { return filter_var( - $account->getProperty(IAccountManager::PROPERTY_PROFILE_ENABLED)->getValue(), + $config->getAppValue('settings', 'profile_enabled_by_default', '1'), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE, ); |