diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2022-12-20 16:48:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 16:48:07 +0100 |
commit | f6ff717b56ac9fa69e60991e982dfdd4c26a95f3 (patch) | |
tree | e2095fcda4ff53d33a91bfd983d8f9d78a83a89e /lib | |
parent | 1db0ddee3beb1c41016388cd3d11cf0232f6030d (diff) | |
parent | 341dda1de618ee76a1e617cc4c15267c120d32c3 (diff) | |
download | nextcloud-server-f6ff717b56ac9fa69e60991e982dfdd4c26a95f3.tar.gz nextcloud-server-f6ff717b56ac9fa69e60991e982dfdd4c26a95f3.zip |
Merge pull request #34772 from nextcloud/fix/clean-ldap-access-factory-usage
Make sure to use AccessFactory to create Access instances and use DI
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/User/Database.php | 20 | ||||
-rw-r--r-- | lib/public/User/Backend/ICountUsersBackend.php | 3 |
2 files changed, 11 insertions, 12 deletions
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index f106c2e8b6d..8bbbccd4540 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -65,14 +65,14 @@ use OCP\User\Backend\ISetPasswordBackend; */ class Database extends ABackend implements ICreateUserBackend, - ISetPasswordBackend, - ISetDisplayNameBackend, - IGetDisplayNameBackend, - ICheckPasswordBackend, - IGetHomeBackend, - ICountUsersBackend, - ISearchKnownUsersBackend, - IGetRealUIDBackend { + ISetPasswordBackend, + ISetDisplayNameBackend, + IGetDisplayNameBackend, + ICheckPasswordBackend, + IGetHomeBackend, + ICountUsersBackend, + ISearchKnownUsersBackend, + IGetRealUIDBackend { /** @var CappedMemoryCache */ private $cache; @@ -456,7 +456,7 @@ class Database extends ABackend implements /** * counts the users in the database * - * @return int|bool + * @return int|false */ public function countUsers() { $this->fixDI(); @@ -464,7 +464,7 @@ class Database extends ABackend implements $query = $this->dbConn->getQueryBuilder(); $query->select($query->func()->count('uid')) ->from($this->table); - $result = $query->execute(); + $result = $query->executeQuery(); return $result->fetchOne(); } diff --git a/lib/public/User/Backend/ICountUsersBackend.php b/lib/public/User/Backend/ICountUsersBackend.php index 52f947a654d..685de48d889 100644 --- a/lib/public/User/Backend/ICountUsersBackend.php +++ b/lib/public/User/Backend/ICountUsersBackend.php @@ -29,11 +29,10 @@ namespace OCP\User\Backend; * @since 14.0.0 */ interface ICountUsersBackend { - /** * @since 14.0.0 * - * @return int|bool The number of users on success false on failure + * @return int|false The number of users on success false on failure */ public function countUsers(); } |