
Untitled
By: a guest on
May 12th, 2010 | syntax:
None | size: 0.83 KB | hits: 36 | expires: Never
foreach ( $bpcpspamlist as $spammer_id ) {
if ($bp->loggedin_user->id == $spammer_id ) {
// we create a boolean variable to store if the logged-in user matches any spammer id
// since it matches, we mark the variable as "true"
$is_spammer = true;
// this line stops the foreach loop and proceeds to the next statement
break;
}
else {
// if the spammer doesn't match the spammer id, we mark the variable as "false"
$is_spammer = false;
}
}
// this part of the code runs after we've finished the foreach loop
if ($is_spammer == false) {
// add your CubePoints code here
if( function_exists('cp_alterPoints') ){
cp_alterPoints($bp->loggedin_user->id, get_option('bp_update_post_add_cp_bp') );
cp_log('Comment', $bp->loggedin_user->id, get_option('bp_update_post_add_cp_bp'), BuddyPress);
}
}