diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 7f5b06cc5f654..a49b2e34a936e 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -754,12 +754,12 @@ public function getLastLoggedInUsers(?int $limit = null, int $offset = 0, string $connection = \OC::$server->getDatabaseConnection(); $queryBuilder = $connection->getQueryBuilder(); - $queryBuilder->select('pref_login.userid') + $queryBuilder->select('pref_login.*') ->from('preferences', 'pref_login') ->where($queryBuilder->expr()->eq('pref_login.appid', $queryBuilder->expr()->literal('login'))) ->andWhere($queryBuilder->expr()->eq('pref_login.configkey', $queryBuilder->expr()->literal('lastLogin'))) - ->setFirstResult($offset) - ->setMaxResults($limit) + //->setFirstResult($offset) + //->setMaxResults($limit) ; // Oracle don't want to run ORDER BY on CLOB column @@ -785,8 +785,11 @@ public function getLastLoggedInUsers(?int $limit = null, int $offset = 0, string )); } + echo $queryBuilder->getSQL(), PHP_EOL; /** @var list */ - $list = $queryBuilder->executeQuery()->fetchAll(\PDO::FETCH_COLUMN); + //$list = $queryBuilder->executeQuery()->fetchAll(\PDO::FETCH_COLUMN); + $list = $queryBuilder->executeQuery()->fetchAll(\PDO::FETCH_ASSOC); + var_dump($list); return $list; }