bb_ksd_check_profile

The BuddyPress bb ksd check profile function.

Description

bb_ksd_check_profile( $user_id ); 

Parameters (1)

0. $user_id
The user id.

Usage

  1. if ( !function_exists( 'bb_ksd_check_profile' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/akismet.php'; 
  3.  
  4. // The user id. 
  5. $user_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_ksd_check_profile($user_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/akismet.php  
  1. function bb_ksd_check_profile( $user_id ) 
  2. global $bb_current_user, $user_obj; 
  3. $bb_current_id = bb_get_current_user_info( 'id' ); 
  4. bb_set_current_user( $user_id ); 
  5. if ( $bb_current_id && $bb_current_id != $user_id ) { 
  6. if ( $user_obj->data->is_bozo && !$bb_current_user->data->is_bozo ) { 
  7. bb_ksd_submit( $user_id, 'hammer' ); 
  8. if ( !$user_obj->data->is_bozo && $bb_current_user->data->is_bozo ) { 
  9. bb_ksd_submit( $user_id, 'spammer' ); 
  10. } else { 
  11. $response = bb_ksd_submit( $bb_current_user->data->occ . ' ' . $bb_current_user->data->interests ); 
  12. if ( 'true' == $response[1] && function_exists( 'bb_bozon' ) ) { 
  13. bb_set_current_user( (int) $bb_current_id );