From feb5366a428e25ebb6054c4a3d0bc6ea304bb295 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 17 Dec 2018 00:31:27 +0100 Subject: LDAP clear cache on config modification also when done via API or CLI Signed-off-by: Arthur Schiwon --- apps/user_ldap/lib/Command/SetConfig.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/user_ldap/lib/Command') diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php index db656558efc..cf73874ade8 100644 --- a/apps/user_ldap/lib/Command/SetConfig.php +++ b/apps/user_ldap/lib/Command/SetConfig.php @@ -26,6 +26,8 @@ namespace OCA\User_LDAP\Command; +use OCA\User_LDAP\ConnectionFactory; +use OCA\User_LDAP\LDAP; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -83,5 +85,8 @@ class SetConfig extends Command { $configHolder = new Configuration($configID); $configHolder->$key = $value; $configHolder->saveConfiguration(); + + $connectionFactory = new ConnectionFactory(new LDAP()); + $connectionFactory->get($configID)->clearCache(); } } -- cgit v1.2.3