Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#5233 closed enhancement (fixed)

Allow to WordPress cron to use BuddyPress functions

Reported by: jconti's profile j.conti Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

Hi,

I have some problems for use a BuddyPress function with WordPress Cron, because that function block it.

The function bp_core_process_spammer_status

http://buddypress.trac.wordpress.org/browser/tags/1.8.1/bp-members/bp-members-functions.php#L541

has hardcoded

if ( !is_super_admin() || bp_is_my_profile() )
        return;

So when my plugin want to use this function (for mark the user as spammer and clean all activity), it is killed because it not Super Admin.

I think can be interesting to enhance the permission check for allow to WordPress cron to use BuddyPress functions.

Change History (2)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 1.9

Confirmed. We should not be doing caps checks in the business functions.

#2 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7562:

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

Note: See TracTickets for help on using tickets.