Want more features on Pastebin? Sign Up, it's FREE!
Guest

r-a-y

By: a guest on May 12th, 2010  |  syntax: PHP  |  size: 0.60 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. foreach ( $bpcpspamlist as $spammer_id ) {
  2.         if ($bp->loggedin_user->id == $spammer_id ) {  
  3.                 // we create a boolean variable to store if the logged-in user matches any spammer id
  4.                 // since it matches, we mark the variable as "true"
  5.                 $is_spammer = true;
  6.                
  7.                 // this line stops the foreach loop and proceeds to the next statement
  8.                 break;
  9.         }
  10.         else {
  11.                 // if the spammer doesn't match the spammer id, we mark the variable as "false"
  12.                 $is_spammer = false;
  13.         }
  14. }
  15.  
  16. // this part of the code runs after we've finished the foreach loop
  17. if ($is_spammer == false) {
  18.         // add your CubePoints code here
  19. }
clone this paste RAW Paste Data