In buddypress default tempalte, username who has posted a certain activity is displayed like this:
bp_activity_action();
But that brings much more than just the username. Is there a simpler way to get the user object/name ?
Wordpess get userdata function doesn’t work, as it displays the page author, not the comment or activity author name.
You have Display name use below function:
OR
Display User Name:
Display name for logged in user:
What about using bp_activity_user_link() ?