Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/22/2022 05:42:45 AM (3 years ago)
Author:
imath
Message:

List the displayed user groups invites in member's front-end screen

As a site admin can view the displayed user groups invites, listed invites have to be the one of this user and not the ones of the site admin.

Adapt the Group Invites feature so that site admins can accept or reject on behalf of the displayed user the listed invites. These two actions made by an admin will generate a specific BP Email informing the user of it.

Props oztaser, dcavins, espellcaste

Closes https://github.com/buddypress/buddypress/pull/15
Fixes #8675

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r13192 r13273  
    9898
    9999        case 'groups_accept_invite':
    100             if ( ! groups_check_user_has_invite( bp_loggedin_user_id(), $group_id ) ) {
     100            if ( ! groups_check_user_has_invite( bp_displayed_user_id(), $group_id ) ) {
    101101                wp_send_json_error( $response );
    102102            }
    103103
    104             if ( ! groups_accept_invite( bp_loggedin_user_id(), $group_id ) ) {
     104            if ( ! groups_accept_invite( bp_displayed_user_id(), $group_id ) ) {
    105105                $response = array(
    106106                    'feedback' => sprintf(
     
    138138
    139139        case 'groups_reject_invite':
    140             if ( ! groups_reject_invite( bp_loggedin_user_id(), $group_id ) ) {
     140            if ( ! groups_reject_invite( bp_displayed_user_id(), $group_id ) ) {
    141141                $response = array(
    142142                    'feedback' => sprintf(
Note: See TracChangeset for help on using the changeset viewer.