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

in_array member ID whitelist for group digest/subscription

By: a guest on May 14th, 2010  |  syntax: PHP Brief  |  size: 0.33 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // in file bp-activity-subscription.php
  2. $allowed_users = array(1, 2);
  3. // $this_user was or needs to be $this_user = $bp->loggedin_user->id  - gloabal $bp is null though
  4. $this_user = '1'; // to test with hardcoded value
  5. if(in_array("$this_user", $allowed_users)):
  6. add_action( 'plugins_loaded', 'activitysub_load_buddypress', 1 );
  7. endif;
clone this paste RAW Paste Data