diff --git a/src/bp-templates/bp-legacy/buddypress-functions.php b/src/bp-templates/bp-legacy/buddypress-functions.php
index c450f023a..5fae502eb 100644
|
a
|
b
|
function bp_legacy_theme_ajax_invite_user() {
|
| 1327 | 1327 | if ( ! bp_groups_user_can_send_invites( $_POST['group_id'] ) ) |
| 1328 | 1328 | return; |
| 1329 | 1329 | |
| 1330 | | if ( ! friends_check_friendship( bp_loggedin_user_id(), $_POST['friend_id'] ) ) |
| 1331 | | return; |
| 1332 | | |
| 1333 | 1330 | $group_id = (int) $_POST['group_id']; |
| 1334 | 1331 | $friend_id = (int) $_POST['friend_id']; |
| 1335 | 1332 | |
| 1336 | 1333 | if ( 'invite' == $_POST['friend_action'] ) { |
| | 1334 | if ( ! friends_check_friendship( bp_loggedin_user_id(), $_POST['friend_id'] ) ) |
| | 1335 | return; |
| | 1336 | |
| 1337 | 1337 | $group = groups_get_group( $group_id ); |
| 1338 | 1338 | |
| 1339 | 1339 | // Users who have previously requested membership do not need |