dol_hash may salt so gravatar is not working

This commit is contained in:
Frédéric FRANCE 2019-11-06 07:50:21 +01:00 committed by GitHub
parent 027d94d41a
commit a1c8e04646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7432,7 +7432,7 @@ class Form
$ret.='<!-- Put link to gravatar -->';
//$defaultimg=urlencode(dol_buildpath($nophoto,3));
$defaultimg='mm';
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)), 3).'?s='.$width.'&d='.$defaultimg.'">'; // gravatar need md5 hash
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?s='.$width.'&d='.$defaultimg.'">'; // gravatar need md5 hash
}
else
{