Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

member-header who is online

By: Naijaping on May 28th, 2013  |  syntax: None  |  size: 0.30 KB  |  views: 64  |  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. <?php
  2. global $bp;
  3. function check_is_user_online($user_id){
  4. if ( bp_has_members( 'type=online&include='.$user_id) ) return true;
  5. else return false;
  6. }
  7. $this_id = bp_displayed_user_id();
  8. $is_online = check_is_user_online($this_id);
  9. if ($is_online) echo "Now Online";
  10. else{ echo "Offline";}
  11.  
  12. ?>