Skip to content

Commit

Permalink
Update e_parse_class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rica-carv authored Aug 4, 2024
1 parent 9fa6f1a commit 5b7bc35
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit 5b7bc35

Please sign in to comment.