[buddypress-trac] [BuddyPress] #866: bp_has_activities() & "Friends" type pagination bug

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Sep 4 19:43:26 UTC 2009


#866: bp_has_activities() & "Friends" type pagination bug
---------------------+------------------------------------------------------
  Reporter:  r-a-y   |       Owner:        
      Type:  defect  |      Status:  closed
  Priority:  minor   |   Milestone:  1.1   
Resolution:  fixed   |    Keywords:        
---------------------+------------------------------------------------------

Comment(by r-a-y):

 Hey Andy,

 The reason why I'm using the global variable is because BP doesn't seem to
 have a "username" function to return.

 BP seems to have everything but that! (ID, display name)

 So since I needed the global $current_user for the username on a
 particular page, I decided to use it for the ID as well.

 I guess I could use:

 {{{
 $user_info = get_userdata(1);

 $theUsername = $user_info->user_login;
 $theUserID = $user_info->ID;
 }}}

 Would using get_userdata() be more beneficial than using global
 $current_user?

 Unless I'm overlooking a very, simple function to return the username (I
 probably am!) ;)

-- 
Ticket URL: <http://trac.buddypress.org/ticket/866#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list