Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

  • josh.grisdale
    Participant

    @joshgrisdale

    Solved it!

    The social login wasn’t setting a Display Name in the extended profile. so I added some code to functions.php to set the extended profile Display Name to be their user name and it started working.

    feild 1 in my extended profile is Display Name, so:

    function update_names( $user_id ) {
    	$data = get_userdata( $user_id );
    	$username = $data->user_login;
    	$xdisplay = xprofile_get_field_data( 1, $user_id );
    	if (empty($xdisplay)) {
            xprofile_set_field_data( 1, $user_id, $username);
        }
    }
    add_action( 'user_register', 'update_names' );

    josh.grisdale
    Participant

    @joshgrisdale

    Hi,

    I’m not really a programmer and just hacked together some stuff I found…

    but,

    First of all I assume that xprofile_get_field_data only gets feilds in the Extended Profile tab of the user, so you would either need to add those fields to the Extended Profile, or you would need another wordpress function to get it from the regular profile likely

    $current_user->user_firstname (https://codex.wordpress.org/Function_Reference/wp_get_current_user)

    $newname = $current_user->user_firstname . $current_user->user_lastname;

    I would guess…


    josh.grisdale
    Participant

    @joshgrisdale

    BuddyBoss claimed it was normal behavior for BuddyPress and I gave up…


    josh.grisdale
    Participant

    @joshgrisdale

    Never mind, got it!

    For others who may be interested in the future:

    function displayname_sync( $user_id ) {
    	$newname = xprofile_get_field_data( 'Display Name', $user_id );
    	if ($newname !== '') {
    		wp_update_user( array( 'ID' => $user_id, 'display_name' => $newname ) );
    	}
    }
    add_action( 'xprofile_updated_profile', 'displayname_sync' );
    

    josh.grisdale
    Participant

    @joshgrisdale

    The plugin is very old… could it break my site?


    josh.grisdale
    Participant

    @joshgrisdale

    Thanks!


    josh.grisdale
    Participant

    @joshgrisdale

    Any emails sent via BuddyPress like new messages from users etc


    josh.grisdale
    Participant

    @joshgrisdale

    I’m interested in the same thing! I want them to read it on the website, not in email.

    Any answers?


    josh.grisdale
    Participant

    @joshgrisdale

    Hello again.

    Thank you for the quick reply. My site is https://www.accessibletravelforum.com/activity/

    I use BuddyBoss for my theme. I changed to the Twenty Fifteen theme and it was fine there, so it seems to be a BuddyBoss issue.

    I played around a bit more and seem to found the possible bug:

    The filter selector “activity-filter-by”. It defaults to “Everything” but seems to be a bit off.

    Duplication:

    1. Load activity stream normally and, as discussed before, there are duplicate updates.
    2. Change the filter from the default of “Everything” to something else ie “Posts” (the activity stream updates as expected)
    3. Change the filter back to “Everything” and it shows everything again BUT now all comments etc are nested and there are no duplicated comments.

    So, it appears that the original “Everything” filter is not working correctly.

    Again, it didn’t happen for the normal Twenty Fifteen template, so this seems to be a BuddyBoss bug.

    I have reached out to BuddyBoss support for help. But, in the mean time, can anyone suggest a way to fix this?

    Thanks again!

Viewing 9 replies - 1 through 9 (of 9 total)
Skip to toolbar