Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: how can I prevent last name from showing everywhere?


Andy Peatling
Keymaster

@apeatling

This should be an admin option, and will likely be added sometime before the first release. Right now the easiest way to stop this is to modify the bp_user_fullname() function as this will change it everywhere.

Line 243 of bp-xprofile-templatetags.php

function bp_fetch_user_fullname( $user_id = false, $echo = true ) {
global $bp;

if ( !$user_id )
$user_id = $bp['current_userid'];

$ud = get_userdata($user_id);

if ( $echo )
echo $ud->user_login;
else
return $ud->user_login;
}

This is just a temporary solution, and it will break in the future. It should tide you over until a better option is available.

Skip to toolbar