Forum Replies Created
-
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' );
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…
BuddyBoss claimed it was normal behavior for BuddyPress and I gave up…
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' );
The plugin is very old… could it break my site?
Thanks!
Any emails sent via BuddyPress like new messages from users etc
I’m interested in the same thing! I want them to read it on the website, not in email.
Any answers?
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:
- Load activity stream normally and, as discussed before, there are duplicate updates.
- Change the filter from the default of “Everything” to something else ie “Posts” (the activity stream updates as expected)
- 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!