diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-01-30 15:07:15 +0100 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2025-02-09 21:55:34 +0100 |
commit | cf283249cc1c38da63d023e35a0b87a50078d902 (patch) | |
tree | bb559ff79ffc1f3ed9a05ebfd43fd5ef60bfe342 | |
parent | 27673a36116eb55e2423aafa2647d6b3790c443f (diff) | |
download | nextcloud-server-backport/50567/stable31.tar.gz nextcloud-server-backport/50567/stable31.zip |
feat(user_ldap): Add a --clearcache option to ldap:test-user-settingsbackport/50567/stable31
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/user_ldap/lib/Command/TestUserSettings.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Command/TestUserSettings.php b/apps/user_ldap/lib/Command/TestUserSettings.php index 78188332a42..88524eded02 100644 --- a/apps/user_ldap/lib/Command/TestUserSettings.php +++ b/apps/user_ldap/lib/Command/TestUserSettings.php @@ -46,6 +46,12 @@ class TestUserSettings extends Command { InputOption::VALUE_REQUIRED, 'A group DN to check if the user is a member or not' ) + ->addOption( + 'clearcache', + null, + InputOption::VALUE_NONE, + 'Clear the cache of the LDAP connection before the beginning of tests' + ) ; } @@ -54,6 +60,9 @@ class TestUserSettings extends Command { $uid = $input->getArgument('user'); $access = $this->backend->getLDAPAccess($uid); $connection = $access->getConnection(); + if ($input->getOption('clearcache')) { + $connection->clearCache(); + } $configPrefix = $connection->getConfigPrefix(); $knownDn = ''; if ($access->stringResemblesDN($uid)) { |