Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Do not require to pass full OgRole objects when we only need the ID. #516

Merged
merged 1 commit into from
Jun 10, 2019

Conversation

pfrenssen
Copy link
Contributor

I stumbled upon this when looking into #487.

We have recently added the methods MembershipManager::getUserGroupsByRoles() and MembershipManager::getUserGroupIdsByRoles() but in fact we do not need to have the full role objects for this to work. The first thing that is done is to retrieve the role ID and then the role objects are no longer required.

We can simplify things by just requiring developers to pass in the role IDs. This would also save developers the effort of having to load the full OgRole objects just to pass them into this method.

@pfrenssen pfrenssen added Clean-up Performance Performance issues or improvements Drupal 8 labels Jun 10, 2019
@pfrenssen
Copy link
Contributor Author

I'm merging this in so it can be included in the alpha3 release.

@pfrenssen pfrenssen merged commit f58b7f1 into 8.x-1.x Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Clean-up Drupal 8 Performance Performance issues or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant