
r-a-y
By: a guest on
May 12th, 2010 | syntax:
PHP | size: 0.60 KB | hits: 54 | 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
}