Fixes Gravatar Bug that overrides the actual User Picture - Refs #7857

1.10.x
José Loguercio 9 years ago
parent bda9ac54e7
commit a673046816
  1. 24
      main/inc/lib/usermanager.lib.php

@ -1492,23 +1492,25 @@ class UserManager
$gravatarEnabled = api_get_setting('gravatar_enabled');
if ($gravatarEnabled === 'true') {
$file = self::getGravatar(
$imageWebPath['email'],
$gravatarSize,
api_get_setting('gravatar_type')
);
if ($addRandomId) {
$file .= '&rand='.uniqid();
}
return $file;
}
$anonymousPath = api_get_path(WEB_CODE_PATH).'img/'.$pictureAnonymous;
if ($pictureWebFile == 'unknown.jpg' || empty($pictureWebFile)) {
if ($gravatarEnabled === 'true') {
$file = self::getGravatar(
$imageWebPath['email'],
$gravatarSize,
api_get_setting('gravatar_type')
);
if ($addRandomId) {
$file .= '&rand='.uniqid();
}
return $file;
}
return $anonymousPath;
}

Loading…
Cancel
Save