Skip to:

Printing out a Users name, picture, and link from User ID

  • Avatar of jordashtalon


    I was able to get an array of all the moderators of a certain group, the array dump looks like this:

    Array ( [0] => stdClass Object ( [user_id] => 10 [date_modified] => 2010-07-25 01:51:48 ) [1] => stdClass Object ( [user_id] => 16 [date_modified] => 2010-07-26 14:37:24 ) [2] => stdClass Object ( [user_id] => 27 [date_modified] => 2010-07-26 16:49:17 ) )

    So I should be able to loop through all the user ids, is there a function to get a link to the users profile, users name, and users picture, all from the user ID?

    Where can I look up functions like that? Is there a place to look it up?

    I’m also looking for the following functions:

    most recent user in a group by id, last activity date of a group by id (e.g. Last Activity 2 days ago..)

    Thanks for all your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of Roger Coathup
    Roger Coathup


    Have a look at the functions in bp-core.php, bp-core-templatetags.php :

    You can call functions such as bp_core_get_username, bp_core_get_user_displayname, bp_member_avatar, bp_member_profile_data

    There is a list of template tags being developed, (, but I tend to resort to using find in files in my editor (Coda) and trawling the BuddyPress files.

    I understand @johnjamesjacoby is doing work to significantly enhance the API for future BuddyPress releases

    I suggest asking your group id questions in a separate thread

    Avatar of jordashtalon



    The bp_core_get_user_displayname($userid) function worked perfectly.

    However bp_member_avatar($userid) seems to not do anything, any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.