When getting the groups a user belongs to, you're getting an array of group IDs using getUserGroups() then looping to get all the group objects by ID. You could get them directly by using getUserGroupObjects() instead of getUserGroups()
That function uses a GroupList object and filters it by the User ID so it might be marginally more efficient.
Hello,
When getting the groups a user belongs to, you're getting an array of group IDs using getUserGroups() then looping to get all the group objects by ID. You could get them directly by using getUserGroupObjects() instead of getUserGroups()
That function uses a GroupList object and filters it by the User ID so it might be marginally more efficient.