bp_core_action_delete_user

Process user deletion requests.

Description

bp_core_action_delete_user(); 

Note: No longer called here. See the Settings component.


Usage

  1. if ( !function_exists( 'bp_core_action_delete_user' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-actions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_action_delete_user(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-members/bp-members-actions.php  
  1. function bp_core_action_delete_user() { 
  2.  
  3. if ( !bp_current_user_can( 'bp_moderate' ) || bp_is_my_profile() || !bp_displayed_user_id() ) 
  4. return false; 
  5.  
  6. if ( bp_is_current_component( 'admin' ) && bp_is_current_action( 'delete-user' ) ) { 
  7.  
  8. // Check the nonce. 
  9. check_admin_referer( 'delete-user' ); 
  10.  
  11. $errors = false; 
  12.  
  13. bp_core_add_message( sprintf( __( '%s has been deleted from the system.', buddypress ), bp_get_displayed_user_fullname() ) ); 
  14. } else { 
  15. bp_core_add_message( sprintf( __( 'There was anerrordeleting %s from the system. Please try again.', buddypress ), bp_get_displayed_user_fullname() ), error ); 
  16. $errors = true; 
  17.  
  18.  
  19. if ( $errors ) 
  20. else