shield
shield copied to clipboard
feat: Add user relations loading methods for groups and permissions
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: https://github.com/lonnieezell/Bonfire2/issues/558
Checklist:
- [x] Securely signed commits
- [x] Component(s) with PHPDoc blocks, only if necessary or adds value
- [x] Unit testing, with >80% coverage
- [x] User guide updated
- [x] Conforms to style guide