Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get username/display name in Buddypress?

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.

like image 903
pyronaur Avatar asked Jun 14 '12 16:06

pyronaur


People also ask

How do I change my BuddyPress username?

Once activated the plugin create a new tab at Profile>>Settings>>Change Username.

What is BuddyPress WordPress?

BuddyPress is a WordPress plugin that allows users to add a community feature to their WordPress site. Members can join groups, create their own profiles, connect with people (like on a social network), and privately message each other.


1 Answers

You have Display name use below function:

bp_get_displayed_user_fullname()

OR

Display User Name:

bp_core_get_username($user_id)
like image 135
Chirag Patel Avatar answered Sep 29 '22 23:09

Chirag Patel