diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-01-30 15:07:15 +0100 |
---|---|---|
committer | max-nextcloud <max@nextcloud.com> | 2025-03-05 17:01:27 +0100 |
commit | 11ce100818b7ea3598a70c18f412f56dd301b7f8 (patch) | |
tree | 24ddbe444c067bf8f4a66f9ab19d8439ca7f46f0 | |
parent | 779f2934b837772e7e9d70da1df12224505f0e07 (diff) | |
download | nextcloud-server-backport/50567/stable30.tar.gz nextcloud-server-backport/50567/stable30.zip |
feat(user_ldap): Add a --clearcache option to ldap:test-user-settingsbackport/50567/stable30
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)) { |