Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rica carv missing avatar check reopens pull #5241 #5311

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
12 changes: 10 additions & 2 deletions e107_handlers/e_parse_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4308,14 +4308,22 @@ public function toAvatar($userData = null, $options = array())
$image = (!empty($userData['user_image'])) ? varset($userData['user_image']) : null;

$genericFile = e_IMAGE . 'generic/blank_avatar.jpg';
$genericImg = $tp->thumbUrl($genericFile, 'w=' . $width . '&h=' . $height, true, $full);
$genericImg = $tp->thumbUrl($genericFile, 'w=' . $width . '&h=' . $height, false, $full);

if (!empty($image))
{

if (strpos($image, '://') !== false) // Remote Image
{
$url = $image;
if (@fopen($image, 'r'))
{
$url = $image;
}
else
{
$file = $genericFile;
$url = $genericImg;
}
}
elseif (strpos($image, '-upload-') === 0)
{
Expand Down
Loading