Changeset 14043
- Timestamp:
- 10/10/2024 07:55:18 PM (4 weeks ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/actions/join.php
r13882 r14043 16 16 17 17 if ( ! bp_is_single_item() || ! bp_is_groups_component() || ! bp_is_current_action( 'join' ) ) { 18 return; 19 } 20 21 /* 22 * Ensure that the invite_status key exists, to avoid a group being joinable when its 23 * creation process was interrupted. 24 */ 25 if ( ! groups_get_groupmeta( bp_get_current_group_id(), 'invite_status' ) ) { 18 26 return; 19 27 } -
trunk/src/bp-groups/bp-groups-functions.php
r14024 r14043 665 665 $group = bp_get_group( $group ); 666 666 667 /* 668 * When the group create first step is completed, the group's status has not been defined by the 669 * group creator yet and defaults to public. As the group status & the invite status are set once 670 * the group create second step is completed, we need to wait for this step to be achieved to let 671 * users join the group being created otherwise it would be possible for a user to "pre-join" a 672 * private/hidden group. Checking if the invite status is set is the only way to make sure this 673 * second step has been completed. If it's not the case, no need to go further. 674 */ 675 if ( empty( $group->id ) || ! groups_get_groupmeta( $group->id, 'invite_status' ) ) { 667 if ( empty( $group->id ) ) { 676 668 return false; 677 669 } -
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r14013 r14043 1615 1615 if ( ! bp_current_user_can( 'groups_join_group', array( 'group_id' => $group->id ) ) ) { 1616 1616 esc_html_e( 'Error joining group', 'buddypress' ); 1617 } 1618 1619 /* 1620 * Ensure that the invite_status key exists, to avoid a group 1621 * being joinable when its creation process was interrupted. 1622 */ 1623 if ( ! groups_get_groupmeta( $group->id, 'invite_status' ) ) { 1624 esc_html_e( 'Error joining group', 'buddypress' ); 1625 break; 1617 1626 } 1618 1627 -
trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php
r13878 r14043 169 169 'type' => 'error', 170 170 ); 171 } elseif ( 'public' !== $group->status ) {171 } elseif ( 'public' !== $group->status || ! groups_get_groupmeta( $group->id, 'invite_status' ) ) { 172 172 $response = array( 173 173 'feedback' => $errors['cannot'],
Note: See TracChangeset
for help on using the changeset viewer.