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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robertom created an issue. See original summary.

robertom’s picture

Status: Active » Needs review
FileSize
445 bytes
robertom’s picture

New version for fix another "return;"

mxr576’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

David Hernández’s picture

I 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

David Hernández’s picture

By the way, I can confirm that this patch still applies nicely.

jacob.embree’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
FileSize
1.34 KB

Fixing the return value renders the check for the return type unnecessary in OgSelectionHandler.class.php.

jacob.embree’s picture

Actually, 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.

alesr’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +OG-7.x-2.10-release

Reviewed changes and accepted PR is here: https://github.com/Gizra/og/pull/359#pullrequestreview-111661199 to speed things up.

alesr’s picture

Hiding patches in this issue to keep the consistency of active development on GitHub.

  • jacob.embree committed 28c2d66 on 7.x-2.x
    Issue #2569471 by robertom, jacob.embree: og_get_groups_by_user don't...
alesr’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.