$setDatabaseValue($enabled);
return $enabled;
}
+
+ public function getDisabledUserList(int $offset = 0, ?int $limit = null): array {
+ throw new \Exception('This is implemented directly in User_Proxy');
+ }
}
namespace OCA\User_LDAP;
use OCA\User_LDAP\User\DeletedUsersIndex;
+use OCA\User_LDAP\User\OfflineUser;
use OCA\User_LDAP\User\User;
use OCP\IConfig;
use OCP\IUserBackend;
public function setUserEnabled(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): bool {
return $this->handleRequest($uid, 'setUserEnabled', [$uid, $enabled, $queryDatabaseValue, $setDatabaseValue]);
}
+
+ public function getDisabledUserList(int $offset = 0, ?int $limit = null): array {
+ return array_map(
+ fn (OfflineUser $user) => $user->getOCName(),
+ array_slice(
+ $this->deletedUsersIndex->getUsers(),
+ $offset,
+ $limit
+ )
+ );
+ }
}
* @param callable(bool):void $setDatabaseValue A callable to set the enabled state in the database.
*/
public function setUserEnabled(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): bool;
+
+ /**
+ * Get the list of disabled users, to merge with the ones disabled in database
+ *
+ * @since 28.0.0
+ *
+ * @return string[]
+ */
+ public function getDisabledUserList(int $offset = 0, ?int $limit = null): array;
}