I'm a php/drupal newbie, so excuse me if something is wrong or i'm inaccurate..

I installed Global Avatar and i shared the table. Everything seemed to go fine, but all user pictures on front are the picture of the current user.

i solved this modifying global_avatar.module, the function global_avatar_preprocess_user_picture. This piece of code seems to solve it:

function global_avatar_preprocess_user_picture(&$variables) {
if (variable_get('user_pictures', 0)) {
$account = $variables['account'];

$uid=$account->uid;
$user=user_load($uid);

if (!empty($user->mail)) {
$mail = $user->mail;
}
elseif (!empty($variables['user']->mail)) {
$mail = $user->mail;
}
else {
$mail = '';
}
$avatar = global_avatar_get_user_avatar($mail);

...

Comments

Luby1917’s picture

Issue summary: View changes