Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The documentation says that the function og_get_groups_by_user()
returns: "An array with the group IDs or an empty array."
When user doesn't have any membership, the function don't return an empty array.
Comment | File | Size | Author |
---|
Comments
Comment #2
robertom CreditAttribution: robertom commentedComment #3
robertom CreditAttribution: robertom commentedNew version for fix another "return;"
Comment #4
mxr576I found the same issue and this patch looks a proper solution to me. I'd say it should be added to OG as soon as possible after 11 months inactivity.
Comment #5
David Hernández CreditAttribution: David Hernández as a volunteer commentedI didn't notice this issue and I've created a duplicated one on github. Linked it here to give proper credit.
Issue on github, just in case: https://github.com/Gizra/og/issues/152
Comment #6
David Hernández CreditAttribution: David Hernández as a volunteer commentedBy the way, I can confirm that this patch still applies nicely.
Comment #7
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedFixing the return value renders the check for the return type unnecessary in OgSelectionHandler.class.php.
Comment #8
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedActually, David, would you care to add a commit to your pull request that removes that line? According to the project page for this module development takes place on GitHub.
Comment #9
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedThe GitHub issue for this is here: og_get_groups_by_user not working as documented #152.
Here is one pull request: Fixes issue 152. Replaces NULL returns with emtpy array returns in og_get_groups_by_user #153
Here is my pull request: Fixes #152: Replaces NULL returns with emtpy array returns in og_get_groups_by_user() #359
Comment #10
alesr CreditAttribution: alesr at BigScreen Group commentedReviewed changes and accepted PR is here: https://github.com/Gizra/og/pull/359#pullrequestreview-111661199 to speed things up.
Comment #11
alesr CreditAttribution: alesr at BigScreen Group commentedHiding patches in this issue to keep the consistency of active development on GitHub.
Comment #13
alesr CreditAttribution: alesr at BigScreen Group commented