diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php index 81354ad06b530..5ef0bc1f206ed 100644 --- a/apps/user_ldap/lib/Mapping/AbstractMapping.php +++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php @@ -94,7 +94,7 @@ protected function useCacheByUserCount(): bool { } $qb = $this->dbc->getQueryBuilder(); - $q = $qb->selectAlias($qb->createFunction('COUNT(owncloud_name)'), 'count') + $q = $qb->select($qb->func()->count('owncloud_name', 'count')) ->from($this->getTableName()); $q->setMaxResults(self::LOCAL_CACHE_OBJECT_THRESHOLD + 1); $result = $q->executeQuery();