Hello,
You can use this plugin for showing the ID in the dashboard.
Show IDs by 99 Robots
and you may add following code to your theme’s functions.php to show the ID on user profile when the user is viewing his/her own profile or it is being viewed by the site admin.
/**
* Show User ID on a user's profile to the profile owner or Administrator.
*/
function bidboy_show_displayed_user_id() {
if ( bp_is_my_profile() || is_super_admin() ) {
echo 'ID: ' . bp_displayed_user_id();
}
}
add_action( 'bp_before_member_header_meta', 'bidboy_show_displayed_user_id' );
Best Regards
B
Thanks for the reply!
None of your methods shows the ID to the user, but only shows it on the “All Users” page in wp-admin.
I would also like the user to see his ID in his profile so that he can tell us if he needs help with that account.
Hi,
The code bitboy provided works fine with the nouveau template, if you are using the legacy template then try this code:
function ps_show_displayed_user_id() {
if ( bp_is_my_profile() || is_super_admin() ) {
echo 'ID: ' . bp_displayed_user_id();
}
}
add_action( 'bp_profile_header_meta', 'ps_show_displayed_user_id' );
Please try to mention your template pack when asking for such kind of help in the forum, because the hooks differ in both the templates, that will also help us to help you better.
Thanks