Avatar bug on last topics: non registered user's post associated with actual logged in user (in certain conditions)
Posted: Mon Apr 05, 2021 9:16 am
Manual fix (or download the ready file more below)
file
/wp-content/plugins\/wp-w3all-phpbb-integration/views/phpbb_last_topics.php
search for:
change into:
then search for
change into:
or download the ready and updated file on repo:
https://plugins.trac.wordpress.org/expo ... topics.php
and substitute it into folder:
/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics.php
Result: if an user is not existent into wordpress, and own an avatar in phpBB his phpBB avatar will display.
If the user exist in WP and own an avatar, the avatar will display.
It the user do not own any avatar that can display, both in wp and phpBB, then the dafault WP gravatar, based on WP Settings -> Discussion -> Gravatar will display for the user.
file
/wp-content/plugins\/wp-w3all-phpbb-integration/views/phpbb_last_topics.php
search for:
Code: Select all
$w3all_avatar_display = ( is_email( $phpbbUAVA ) !== false ) ? get_avatar($phpbbUAVA, $w3all_last_t_avatar_dim) : '<img alt="" src="'.$phpbbUAVA.'" class="avatar" width="'.$w3all_last_t_avatar_dim.'" height="'.$w3all_last_t_avatar_dim.'">';
Code: Select all
if(is_email( $phpbbUAVA )){
$w3all_avatar_display = get_avatar($phpbbUAVA, $w3all_last_t_avatar_dim);
} elseif(!empty($phpbbUAVA)){
$w3all_avatar_display = '<img alt="" src="'.$phpbbUAVA.'" class="avatar" width="'.$w3all_last_t_avatar_dim.'" height="'.$w3all_last_t_avatar_dim.'">';
} else {
$w3all_avatar_display = get_avatar(0, $w3all_last_t_avatar_dim);
}
Code: Select all
$countn++;
Code: Select all
$phpbbUAVA = '';
$countn++;
or download the ready and updated file on repo:
https://plugins.trac.wordpress.org/expo ... topics.php
and substitute it into folder:
/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics.php
Result: if an user is not existent into wordpress, and own an avatar in phpBB his phpBB avatar will display.
If the user exist in WP and own an avatar, the avatar will display.
It the user do not own any avatar that can display, both in wp and phpBB, then the dafault WP gravatar, based on WP Settings -> Discussion -> Gravatar will display for the user.