Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/12/2013 03:14:04 PM (11 years ago)
Author:
boonebgorges
Message:

Don't do capabilities checks in bp_core_process_spammer_status()

These inline checks prevent the function from being used programmatically, such
as during a cron job. Instead, we move the cap checks up to the controller
"action" functions.

Fixes #5233

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-actions.php

    r7228 r7562  
    2525 */
    2626function bp_core_action_set_spammer_status( $user_id = 0 ) {
     27
     28    // Only super admins can currently spam users (but they can't spam
     29    // themselves)
     30    if ( ! is_super_admin() || bp_is_my_profile() ) {
     31        return;
     32    }
    2733
    2834    // Use displayed user if it's not yourself
Note: See TracChangeset for help on using the changeset viewer.