aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoryemkareems <yemkareems@gmail.com>2024-07-04 14:41:05 +0530
committeryemkareems <yemkareems@gmail.com>2024-07-08 15:42:55 +0530
commitae95e467871cbf54df55b1b4f3f512d66b8b8880 (patch)
tree33985890c25c5939e1015e96a064857bf78722ee /lib
parentceedfb46162e53d39460d25b781ddc21c5a9313f (diff)
downloadnextcloud-server-ae95e467871cbf54df55b1b4f3f512d66b8b8880.tar.gz
nextcloud-server-ae95e467871cbf54df55b1b4f3f512d66b8b8880.zip
fix: limit and fixLimit removed. negative limit handled in controller. removed getUsersSortedByLastLogin from Manager and instead used the config in controller
Signed-off-by: yemkareems <yemkareems@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AllConfig.php11
-rw-r--r--lib/private/User/Manager.php15
-rw-r--r--lib/public/IUserManager.php5
3 files changed, 1 insertions, 30 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index 78546531dc6..f39182683f5 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -492,7 +492,7 @@ class AllConfig implements IConfig {
}
/**
- * Gets the list of users based on their lastLogin info asc or desc
+ * Gets the list of user ids sorted by lastLogin, from most recent to least recent
*
* @param int|null $limit how many users to fetch
* @param int $offset from which offset to fetch
@@ -500,7 +500,6 @@ class AllConfig implements IConfig {
* @return array of user IDs
*/
public function getLastLoggedInUsers(?int $limit = null, int $offset = 0, string $search = ''): array {
- $limit = $this->fixLimit($limit);
// TODO - FIXME
$this->fixDIInit();
@@ -574,12 +573,4 @@ class AllConfig implements IConfig {
public function getSystemConfig() {
return $this->systemConfig;
}
-
- private function fixLimit($limit) {
- if (is_int($limit) && $limit >= 0) {
- return $limit;
- }
-
- return null;
- }
}
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index aeadb338ea0..d93431a2699 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -343,21 +343,6 @@ class Manager extends PublicEmitter implements IUserManager {
}
/**
- * @return IUser[]
- */
- public function getUsersSortedByLastLogin(?int $limit = null, int $offset = 0, $search = ''): array {
- $users = $this->config->getLastLoggedInUsers($limit, $offset, $search);
- return array_combine(
- $users,
- array_map(
- fn (string $uid): IUser => new LazyUser($uid, $this),
- $users
- )
- );
- }
-
-
- /**
* Search known users (from phonebook sync) by displayName
*
* @param string $searcher
diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php
index 8b080fd75c5..851b565f617 100644
--- a/lib/public/IUserManager.php
+++ b/lib/public/IUserManager.php
@@ -125,11 +125,6 @@ interface IUserManager {
public function getDisabledUsers(?int $limit = null, int $offset = 0, string $search = ''): array;
/**
- * @return IUser[]
- * @since 30.0.0
- */
- public function getUsersSortedByLastLogin(?int $limit = null, int $offset = 0, $search = ''): array;
- /**
* Search known users (from phonebook sync) by displayName
*
* @param string $searcher