diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-01-30 15:07:15 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-01-30 15:07:15 +0100 |
commit | 7fa117dd0fe264a491a2bb15444741f04236f4bb (patch) | |
tree | 7b47250dfa35e55da50be10e2dc56d52d53a9337 | |
parent | e09460231114636f5d6464c8d0fdeef332bbae2d (diff) | |
download | nextcloud-server-enh/ldap-add-test-settings-command.tar.gz nextcloud-server-enh/ldap-add-test-settings-command.zip |
feat(user_ldap): Add a --clearcache option to ldap:test-user-settingsenh/ldap-add-test-settings-command
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)) { |