Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/23/2014 07:27:19 PM (10 years ago)
Author:
r-a-y
Message:

When deleting a group in the Groups dashboard, use bp_current_user_can().

The groups admin frontend also uses bp_current_user_can() to determine
whether a user can delete a group. Thus, this commit mirrors this
capability check in the Groups admin dashboard.

Fixes #5348.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-admin.php

    r8557 r8681  
    561561function bp_groups_admin_delete() {
    562562
    563     if ( ! is_super_admin() )
     563    if ( ! bp_current_user_can( 'bp_moderate' ) ) {
    564564        die( '-1' );
     565    }
    565566
    566567    $group_ids = isset( $_REQUEST['gid'] ) ? $_REQUEST['gid'] : 0;
Note: See TracChangeset for help on using the changeset viewer.