diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-22 16:44:27 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-22 16:44:27 +0100 |
commit | 3446d9c0b28f221ccae7a6957b1ffd64fd944269 (patch) | |
tree | 5cd4106a30d68fa40eacfd986bec61374c45c734 /apps/user_ldap/lib/User_Proxy.php | |
parent | 68fecc1d9f6810e815c6a6ba80d4c13a0bde98b8 (diff) | |
download | nextcloud-server-3446d9c0b28f221ccae7a6957b1ffd64fd944269.tar.gz nextcloud-server-3446d9c0b28f221ccae7a6957b1ffd64fd944269.zip |
Ignore cache in occ ldap:check-ldap command
This avoids having to wait or reset the cache after deleting a user in
the LDAP.
This also fixes a PHP error when running ldap:check-ldap --update on a
deleted but cached user.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib/User_Proxy.php')
-rw-r--r-- | apps/user_ldap/lib/User_Proxy.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php index 1fdd3cf44b3..5731f314aed 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -204,11 +204,10 @@ class User_Proxy extends Proxy implements \OCP\IUserBackend, \OCP\UserInterface, * * @param string|\OCA\User_LDAP\User\User $user either the Nextcloud user * name or an instance of that user - * @return boolean */ - public function userExistsOnLDAP($user) { + public function userExistsOnLDAP($user, bool $ignoreCache = false): bool { $id = ($user instanceof User) ? $user->getUsername() : $user; - return $this->handleRequest($id, 'userExistsOnLDAP', [$user]); + return $this->handleRequest($id, 'userExistsOnLDAP', [$user, $ignoreCache]); } /** |