SHARE
TWEET

member-header who is online

Naijaping May 28th, 2013 81 Never
  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. ?>
RAW Paste Data
Top