Changeset 14044
- Timestamp:
- 10/10/2024 07:57:42 PM (8 months ago)
- Location:
- branches/14.0/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/14.0/src/bp-groups/actions/join.php
r13882 r14044 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 } -
branches/14.0/src/bp-groups/bp-groups-functions.php
r13997 r14044 662 662 $group = bp_get_group( $group ); 663 663 664 /* 665 * When the group create first step is completed, the group's status has not been defined by the 666 * group creator yet and defaults to public. As the group status & the invite status are set once 667 * the group create second step is completed, we need to wait for this step to be achieved to let 668 * users join the group being created otherwise it would be possible for a user to "pre-join" a 669 * private/hidden group. Checking if the invite status is set is the only way to make sure this 670 * second step has been completed. If it's not the case, no need to go further. 671 */ 672 if ( empty( $group->id ) || ! groups_get_groupmeta( $group->id, 'invite_status' ) ) { 664 if ( empty( $group->id ) ) { 673 665 return false; 674 666 } -
branches/14.0/src/bp-templates/bp-legacy/buddypress-functions.php
r13882 r14044 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 -
branches/14.0/src/bp-templates/bp-nouveau/includes/groups/ajax.php
r13878 r14044 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.