bb_block_current_user

Users.

Description

bb_block_current_user(); 

Usage

  1. if ( !function_exists( 'bb_block_current_user' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-users.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_block_current_user(); 
  7.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-users.php  
  1. function bb_block_current_user() { 
  2. global $bbdb; 
  3. if ( $id = bb_get_current_user_info( 'id' ) ) 
  4. bb_update_usermeta( $id, $bbdb->prefix . 'been_blocked', 1 ); // Just for logging. 
  5. bb_logout(); 
  6. bb_die(__("You've been blocked. If you think a mistake has been made, contact this site's administrator."));