From d8a0b6914116272c72a838383dc376ff0d0fe0b8 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Tue, 9 Jul 2019 20:50:51 -0100 Subject: [PATCH] fix enum option Signed-off-by: Maxence Lange --- lib/Controller/MembersController.php | 2 +- lib/Service/ConfigService.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/Controller/MembersController.php b/lib/Controller/MembersController.php index 29360486b..4a0acbd00 100644 --- a/lib/Controller/MembersController.php +++ b/lib/Controller/MembersController.php @@ -174,7 +174,7 @@ public function searchGlobal($search) { ); } - if ($this->configService->getAppValue('shareapi_allow_share_dialog_user_enumeration') !== 'yes') { + if ($this->configService->getCoreValue('shareapi_allow_share_dialog_user_enumeration') !== 'yes') { $result = array_filter( $result, function($data, $k) use ($search) { diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 5c6947201..26c6ac153 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -200,6 +200,20 @@ public function generateRemoteHost($remote) { } + /** + * Get a value by key + * + * @param string $key + * + * @return string + */ + public function getCoreValue($key) { + $defaultValue = null; + + return $this->config->getAppValue('core', $key, $defaultValue); + } + + /** * Get a value by key *