Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

BuddyPress has a behavior for removing users that does not run through WP's deleted_user action.

I have a hook in my plugin for add_action('deleted_user', 'myScript'); but it only works for WP-related user deletes. It does not run when I remove a user in BuddyPress.

Has anyone hooked to the BP remove user action in their plugin?

If so, what is the action to catch?


share|improve this question

1 Answer 1

buddypress users are actually wordpress users, there is no buddypress user separate from a wordpress user. But maybe add_action('delete_user', 'myScript'); might be helpful which runs before the user is deleted. Buddypress itself uses this action, for example: add_action( 'delete_user', 'bp_core_remove_data' );

share|improve this answer
Thanks @DerykWenaus. I recognize that BP users are, in fact, WP users. My plug has this action add_action('deleted_user', 'myScript'); yet when I "remove" a user through the BuddyPress user management page my script is not envoked. Also the only difference between action 'delete_user' and 'deleted_user' is delete runs before the user is deleted from the DB and deleted runs after the user is deleted form the DB. I will try your suggestion add_action( 'delete_user', 'bp_core_remove_data' );. Thanks! –  H. Ferrence Jan 12 '12 at 11:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.