Skip to content

Conversation

michalsn
Copy link
Member

@michalsn michalsn commented Oct 5, 2025

Description
This PR fixes a bug affecting UserModel::withPermissions(), which caused users without permissions to trigger additional, unnecessary database queries. The same behavior was implemented for the UserModel::withGroups() for unification.

Bug reported here: #1257 (comment)

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the bug Something isn't working label Oct 5, 2025
@dgvirtual
Copy link
Contributor

I can confirm that upon implementing these changes in the code Bonfire2 user list does not make lazy loading database queries for permissions. Query number got down from 25 to 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants