Repository navigation
Conversation
With a limit and several user backends, the remaining limit was reduced by the running total instead of by the users of the current backend, so the count stopped early and came out too low. This affects checks such as countUsersTotal(100) < 100 for recommending the web updater. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Alex <alexperezcoria@gmail.com>
Tiranex
requested review from
Altahrim and
come-nc
and removed request for
a team
December 6, 2026 13:18
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With a limit and more than one user backend,
Manager::countUsersTotal()andUser_Proxy::countUsers()(several LDAP configurations) reduced the remaining limit by the running total instead of by the users of the current backend. The count stopped early and came out too low: backends with 30, 30 and 50 users andcountUsersTotal(100)returned 70.The remaining limit is now reduced by each backend's own count, so the same case returns 100. This matters for checks such as
countUsersTotal(100) < 100(web updater recommendation) andcountUsersTotal(100) >= 100in the DAV migration.New unit tests in
ManagerTestandUser_ProxyTestcover a limit spread over three backends, stopping once the limit is reached, and (for LDAP) no limit. Without the fix they fail with 70 instead of 100. Thetests/lib/User/suite and the LDAPUser_ProxyTest/User_LDAPTestpass, and php-cs-fixer reports no changes. Not validated on a live instance with several user backends.TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)