-
Notifications
You must be signed in to change notification settings - Fork 11
optimize fetching of group member attributes #369
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR optimizes the performance of fetching group member attributes by introducing a new method that retrieves only the necessary LDAP attributes (gecos, mail) in a single batch query, rather than creating individual UnityUser objects for each member.
Key changes:
- Introduced
getUsersAttributes()method in UnityLDAP to batch-fetch specific user attributes - Added
getGroupMembersAttributes()wrapper method in UnityGroup - Updated both panel and admin group member display pages to use the optimized approach
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| resources/lib/UnityLDAP.php | Added new getUsersAttributes() method to batch-fetch user LDAP attributes with filtering |
| resources/lib/UnityGroup.php | Added getGroupMembersAttributes() wrapper to fetch member attributes via LDAP |
| webroot/panel/ajax/get_group_members.php | Refactored to use optimized attribute fetching instead of full UnityUser objects |
| webroot/admin/ajax/get_group_members.php | Refactored to use optimized attribute fetching instead of full UnityUser objects |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
#346