Skip to:
Content

BuddyPress.org

Ticket #8298: 8298.01.patch

File 8298.01.patch, 2.4 KB (added by r-a-y, 4 years ago)
  • src/bp-groups/screens/single/request-membership.php

     
    3838                if ( !check_admin_referer( 'groups_request_membership' ) )
    3939                        return false;
    4040
    41                 if ( !groups_send_membership_request( bp_loggedin_user_id(), $bp->groups->current_group->id ) ) {
     41                if ( !groups_send_membership_request( [ 'user_id' => bp_loggedin_user_id(), 'group_id' => $bp->groups->current_group->id ] ) ) {
    4242                        bp_core_add_message( __( 'There was an error sending your group membership request. Please try again.', 'buddypress' ), 'error' );
    4343                } else {
    4444                        bp_core_add_message( __( 'Your membership request was sent to the group administrator successfully. You will be notified when the group administrator responds to your request.', 'buddypress' ) );
  • src/bp-templates/bp-legacy/buddypress-functions.php

     
    15821582                case 'request_membership' :
    15831583                        check_ajax_referer( 'groups_request_membership' );
    15841584
    1585                         if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
     1585                        if ( ! groups_send_membership_request( [ 'user_id' => bp_loggedin_user_id(), 'group_id' => $group->id ] ) ) {
    15861586                                _e( 'Error requesting membership', 'buddypress' );
    15871587                        } else {
    15881588                                echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button disabled pending membership-requested" rel="membership-requested" href="' . bp_get_group_permalink( $group ) . '">' . __( 'Request Sent', 'buddypress' ) . '</a>';
  • src/bp-templates/bp-nouveau/includes/groups/ajax.php

     
    189189                        break;
    190190
    191191                        case 'groups_request_membership' :
    192                                 if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
     192                                if ( ! groups_send_membership_request( [ 'user_id' => bp_loggedin_user_id(), 'group_id' => $group->id ] ) ) {
    193193                                        $response = array(
    194194                                                'feedback' => sprintf(
    195195                                                        '<div class="bp-feedback error"><span class="bp-icon" aria-hidden="true"></span><p>%s</p></div>',