- Timestamp:
- 04/25/2019 02:55:53 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php
r12369 r12385 449 449 $group_id = bp_get_current_group_id(); 450 450 451 $response = array( 452 'feedback' => __( 'Group invitation could not be removed.', 'buddypress' ), 453 'type' => 'error', 454 ); 455 451 456 // Verify nonce 452 457 if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'groups_invite_uninvite_user' ) ) { 453 wp_send_json_error( 454 array( 455 'feedback' => __( 'Group invitation could not be removed.', 'buddypress' ), 456 'type' => 'error', 457 ) 458 ); 458 wp_send_json_error( $response ); 459 } 460 461 // Verify pending invite. 462 $invites_args = array( 463 'is_confirmed' => false, 464 'is_banned' => null, 465 'is_admin' => null, 466 'is_mod' => null, 467 ); 468 $invites = bp_get_user_groups( $user_id, $invites_args ); 469 if ( empty( $invites ) ) { 470 wp_send_json_error( $response ); 471 } 472 473 if ( ! groups_is_user_admin( bp_loggedin_user_id(), $group_id ) ) { 474 wp_send_json_error( $response ); 459 475 } 460 476
Note: See TracChangeset
for help on using the changeset viewer.