Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add user relations loading methods for groups and permissions #1257

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

michalsn
Copy link
Member

Description
This PR enhances user queries by enabling the retrieval of related user data more efficiently.

It adds two new methods: withGroups() and withPermissions(), which loads user groups and permissions directly when fetching users. The existing withIdentities() method (previously undocumented) has also been included in the documentation.

With these methods, all necessary user information can be loaded in a single query (one per used method), reducing the number of additional queries and improving performance.

The problem this PR solves was described in the Bonfire2 repo: lonnieezell/Bonfire2#558

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 enhancement New feature or request label Feb 28, 2025
Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks.

@dgvirtual Please confirm if the issue has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants