Skip to content

Conversation

@simonLeary42
Copy link
Collaborator

Copy link
Contributor

Copilot AI left a 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.

simonLeary42 and others added 4 commits November 26, 2025 18:20
@simonLeary42 simonLeary42 merged commit ddad19d into main Nov 26, 2025
3 checks passed
@simonLeary42 simonLeary42 deleted the optimize-search branch November 26, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants