Skip to:

BP Member profile shows name as @rich_r..not correct Title name

  • rageshr007


    Hi…I have latest buddy press installation which have LDAP authentication…So the users able to log in with AD credentials and their Disply names shows as actual name and all looks fine…But When we click on a member profile the name shows on their cover image starting with @ sign…Is any way i can show this with their actual Disply Title or name…I noticed the weird name starting with @ sign is similar to their profile url…s any option to show actual readable name on the profile cover image area?

Viewing 1 replies (of 1 total)

  • danbp


    The function used to show @ mention is bp_displayed_user_mentionname in this template context:

    <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>

    Above the profile header you have the fullname, which use this function: bp_displayed_user_fullname.

    To replace the mention by the fullname, you can use this snippet (goes to bp-custom.php):

    function bpfr_user_fullname() {
            // uncomment below if you want this only for logged in users.
    	//if ( !is_user_logged_in() )
    		//return false;
    	echo bp_displayed_user_fullname();
    add_filter( 'bp_get_displayed_user_mentionname', 'bpfr_user_fullname' );

    To remove the existing fullname, you use something like:

    function bpfr_remove_fullname_from_profile() {	
    global $bp;
    	if ( bp_is_active( 'xprofile' ) )
    	if( bp_is_user() && ! bp_get_member_user_id() ) {
            $user_id = 'displayed: '. bp_displayed_user_id();
        } else {
            $user_id = 'get_member_user: '. bp_get_member_user_id();
    	remove_filter( 'bp_displayed_user_fullname', isset( $bp->displayed_user->fullname ) ? $bp->displayed_user->fullname : '' );
    add_filter( 'bp_displayed_user_fullname', 'bpfr_remove_fullname_from_profile' );

    And in case of you want to modify the @ sign, it is hardcoded in the template. You have to remove it manually via a child-theme.

    Many other related topics on the forum.

    Function reference.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar