nextcloud / nextcloud/server

[Bug]: Display to "999+" when users limit is reached in Accounts

Open
#54,878 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 31-feedback bug good first issue
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description
  • Hardcoded limit COUNT_LIMIT_FOR_SUBADMINS = 999 in /apps/settings/lib/Controller/UsersController.php:60
  • When user is Group Admin (subadmin), the system intentionally stops counting at 999 users for performance reasons
  • UsersController.php:165 calls countUsersAndDisabledUsersOfGroups() with this 999 limit
Steps to reproduce
  1. Create a Nextcloud user with "Group Admin" privileges for a group containing > 999 users (e.g. 5000 or more).
  2. Log in as the Group Admin.
  3. Go to "Accounts"
Expected behavior
Expected behavior

The number of users at "All accounts" shown in the left-hand sidebar should reflect the actual number of users the Group Admin can browse (e.g. "5241").

Actual behavior

The sidebar always shows "All accounts 999", even though the Group Admin can browse through more than 999 users without any issue.

Nextcloud Server version

31

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

Proposed fix:

  • display to "999+" when limit is reached (minimal code change)
  • make limit configurable via system config (might affect perfs if big)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/settings/lib/Controller/UsersController.php, especially the COUNT_LIMIT_FOR_SUBADMINS definition at line 60 and the countUsersAndDisabledUsersOfGroups() call around line 165. Reproduce the Group Admin Accounts view with more than 999 users, then verify that the sidebar communicates the capped count appropriately while preserving the existing performance limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.