Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/26/2024 04:56:49 AM (19 months ago)
Author:
imath
Message:

Groups: joining a group needs to wait for group status to be defined

When the group create first step is completed, the group's status has not been defined by the group creator yet and defaults to public. As the group status & the invite status are set once the group create second step is completed, we need to wait for this step to be achieved to let users join the group being created otherwise it would be possible for a user to "pre-join" a private/hidden group. Checking if the invite status is set is the only way to make sure this second step has been completed. If it's not the case, no need to go further in groups_join_group().

Fixes #9162
Closes https://github.com/buddypress/buddypress/pull/294

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/groups/cache.php

    r13592 r13874  
    4242                    $time,
    4343                ),
     44                'invite_status' => array(
     45                    'members',
     46                ),
    4447                'foo' => array(
    4548                    'bar',
     
    5255                'last_activity' => array(
    5356                    $time,
     57                ),
     58                'invite_status' => array(
     59                    'members',
    5460                ),
    5561                'foo' => array(
Note: See TracChangeset for help on using the changeset viewer.