Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#5189 closed defect (bug) (no action required)

bp_core_process_spammer_status don't work if I call it directly from a plugin

Reported by: jconti's profile j.conti Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.8.1
Component: Core Keywords: reporter-feedback
Cc:

Description

Hi,

I using bp_core_process_spammer_status in WangGuard Plugin.

Since BuddyPress 1.8 I have some problems.

I call the bp_core_process_spammer_status when a sites admin mark a user as spam in WangGuard Users screen for remove all activity and groups created by the user.

http://plugins.trac.wordpress.org/browser/wangguard/tags/1.5.10/wangguard-admin.php#L1020

In BuddyPress 1.8, when I called that function, the activity was removed, but not the groups. Now, in version 1.8.1 activity and groups, are not removed.

I think there is something wrong with this.

Change History (3)

#1 @boonebgorges
10 years ago

  • Keywords reporter-feedback added

It looks to me like the problem is hook you've chosen for your spam status function. You are hooked to 'bp_core_action_set_spammer_status' http://plugins.trac.wordpress.org/browser/wangguard/tags/1.5.10/wangguard-admin.php#L847. This hook only fires when you mark a user as spam from the *front end*. It looks like this behavior might have changed in BP 1.6; see the inline comment at http://buddypress.trac.wordpress.org/browser/trunk/bp-members/bp-members-actions.php#L58.

In any case, I think it should fix the problem if you move to the 'bp_core_process_spammer_status' hook, which runs *anytime* a user is marked as spam. Check it out at: http://buddypress.trac.wordpress.org/browser/trunk/bp-members/bp-members-functions.php#L615 Could you have a look and see what you find?

#2 @j.conti
10 years ago

Hi again, I'm sorry for the delay.

WangGuard use that Hook for report the user to WangGuard if he is marked as spam at the frontend, but I will take a look to that line.

The problem was when user Admin mark an user as spam at WangGuard user screen. (WangGuard use bp_core_process_spammer_status for clean all user activity and his groups)

BuddyPress 1.7.x WangGuard Remove Activity and Groups.
BuddyPress 1.8.0 WangGuard Remove Activity but not Groups
BuddyPress 1.8.1 Activity and Groups are not removed.

Attention!! BuddyPress latest Trunk (downloaded few minutes ago) rev 7415 Remove all again ( Activity and Groups ) O.O

This ticket can be closed now, but there are something wrong in 1.8 and 1.8.1 that has been fixed in trunk, perhaps inadvertently.

#3 @boonebgorges
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Ha, it's a mystery! Glad to hear it's working on trunk. Thanks, j.conti.

Note: See TracTickets for help on using tickets.