[buddypress-trac] [BuddyPress] #5007: Is @jjj online now?

buddypress-trac noreply at wordpress.org
Wed May 29 09:12:24 UTC 2013

#5007: Is @jjj online now?
 Reporter:  sooskriszta  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Members      |     Version:  1.0
 Severity:  normal       |  Resolution:
 Keywords:               |

Comment (by sooskriszta):

 I take it that something small and simple like this should do the trick
 (Thanks, naijaping)
 global $bp;
 function check_is_user_online($user_id){
 if ( bp_has_members( 'type=online&include='.$user_id) ) return true;
 else return false;
 $this_id = bp_displayed_user_id();
 $is_online = check_is_user_online($this_id);
 if ($is_online) echo "Now Online";
 else{ echo "Offline";}


Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5007#comment:2>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list