diff --git a/lib/Service/LdapService.php b/lib/Service/LdapService.php index 13b27b2d..a616bce6 100644 --- a/lib/Service/LdapService.php +++ b/lib/Service/LdapService.php @@ -48,6 +48,10 @@ public function isLdapDeletedUser(IUser $user): bool { return false; } + if (!$dui->isUserMarked($user->getUID())) { + return false; + } + if (!$dui->hasUsers()) { return false; } diff --git a/tests/stubs/oca_user_ldap.php b/tests/stubs/oca_user_ldap.php index 1e9f96bf..5ab29015 100644 --- a/tests/stubs/oca_user_ldap.php +++ b/tests/stubs/oca_user_ldap.php @@ -26,6 +26,9 @@ public function hasUsers(): bool { public function getUsers(): array { return []; } + + public function isUserMarked(string $uid): bool { + } } namespace OCA\User_LDAP;